CURL_PUSH_ERROROUT: allow the push callback to fail the parent stream

... by adding support for a new dedicated return code.

Suggested-by: Jonathan Cardoso
Assisted-by: Erik Johansson
URL: https://curl.haxx.se/mail/lib-2020-06/0099.html
Closes #5636
This commit is contained in:
Daniel Stenberg 2020-07-16 00:24:29 +02:00
parent 2f5d0e497e
commit 954cd3eb48
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
5 changed files with 28 additions and 21 deletions

View file

@ -36,7 +36,6 @@
1.17 Add support for IRIs
1.18 try next proxy if one doesn't work
1.20 SRV and URI DNS records
1.21 Add return code to CURLMOPT_PUSHFUNCTION to fail the connection
1.22 CURLINFO_PAUSE_STATE
1.23 Offer API to flush the connection pool
1.24 TCP Fast Open for windows
@ -358,13 +357,6 @@
Offer support for resolving SRV and URI DNS records for libcurl to know which
server to connect to for various protocols (including HTTP!).
1.21 Add return code to CURLMOPT_PUSHFUNCTION to fail the connection
Allow the callback to return a value that would stop the entire operation,
like it can be done from most other callbacks.
See https://curl.haxx.se/mail/lib-2020-06/0099.html
1.22 CURLINFO_PAUSE_STATE
Return information about the transfer's current pause state, in both

View file

@ -86,6 +86,9 @@ the ownership of the CURL handle has been taken over by the application.
.IP "CURL_PUSH_DENY (1)"
The callback denies the stream and no data for this will reach the
application, the easy handle will be destroyed by libcurl.
.IP "CURL_PUSH_ERROROUT (2)"
Returning this will reject the pushed stream and return an error back on the
parent stream making it get closed with an error. (Added in curl 7.72.0)
.IP *
All other return codes are reserved for future use.
.SH DEFAULT

View file

@ -892,6 +892,7 @@ CURL_PROGRESSFUNC_CONTINUE 7.68.0
CURL_PROGRESS_BAR 7.1.1 - 7.4.1
CURL_PROGRESS_STATS 7.1.1 - 7.4.1
CURL_PUSH_DENY 7.44.0
CURL_PUSH_ERROROUT 7.72.0
CURL_PUSH_OK 7.44.0
CURL_READFUNC_ABORT 7.12.1
CURL_READFUNC_PAUSE 7.18.0