mirror of
https://github.com/moparisthebest/curl
synced 2025-02-28 17:31:46 -05:00
url: handle abortion by read/write callbacks, too
Otherwise, the FTP protocol would unnecessarily hang 60 seconds if aborted in the CURLOPT_HEADERFUNCTION callback. Reported by: Tomas Mlcoch Bug: https://bugzilla.redhat.com/1005686
This commit is contained in:
parent
857f999353
commit
c639d725a3
@ -29,6 +29,7 @@ This release includes the following bugfixes:
|
|||||||
o TFTP: make the CURLOPT_LOW_SPEED* options work [4]
|
o TFTP: make the CURLOPT_LOW_SPEED* options work [4]
|
||||||
o curl.h: name space pollution by "enum type" [5]
|
o curl.h: name space pollution by "enum type" [5]
|
||||||
o multi: move on from STATE_DONE faster [6]
|
o multi: move on from STATE_DONE faster [6]
|
||||||
|
o FTP: 60 secs delay if aborted in the CURLOPT_HEADERFUNCTION callback [11]
|
||||||
|
|
||||||
This release includes the following known bugs:
|
This release includes the following known bugs:
|
||||||
|
|
||||||
@ -55,3 +56,4 @@ References to bug reports and discussions on issues:
|
|||||||
[8] = http://curl.haxx.se/bug/view.cgi?id=1267
|
[8] = http://curl.haxx.se/bug/view.cgi?id=1267
|
||||||
[9] = http://curl.haxx.se/mail/lib-2013-08/0234.html
|
[9] = http://curl.haxx.se/mail/lib-2013-08/0234.html
|
||||||
[10] = http://curl.haxx.se/mail/lib-2013-08/0136.html
|
[10] = http://curl.haxx.se/mail/lib-2013-08/0136.html
|
||||||
|
[11] = https://bugzilla.redhat.com/1005686
|
||||||
|
@ -5743,12 +5743,18 @@ CURLcode Curl_done(struct connectdata **connp,
|
|||||||
conn->dns_entry = NULL;
|
conn->dns_entry = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(status == CURLE_ABORTED_BY_CALLBACK)
|
switch(status) {
|
||||||
|
case CURLE_ABORTED_BY_CALLBACK:
|
||||||
|
case CURLE_READ_ERROR:
|
||||||
|
case CURLE_WRITE_ERROR:
|
||||||
/* When we're aborted due to a callback return code it basically have to
|
/* When we're aborted due to a callback return code it basically have to
|
||||||
be counted as premature as there is trouble ahead if we don't. We have
|
be counted as premature as there is trouble ahead if we don't. We have
|
||||||
many callbacks and protocols work differently, we could potentially do
|
many callbacks and protocols work differently, we could potentially do
|
||||||
this more fine-grained in the future. */
|
this more fine-grained in the future. */
|
||||||
premature = TRUE;
|
premature = TRUE;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/* this calls the protocol-specific function pointer previously set */
|
/* this calls the protocol-specific function pointer previously set */
|
||||||
if(conn->handler->done)
|
if(conn->handler->done)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user