aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2013-02-08 13:48:56 +0100
committerDaniel Stenberg <daniel@haxx.se>2013-02-08 13:57:01 +0100
commit72688317adcedb9508fd2189e6c6d3945e06a004 (patch)
tree57929c31c5dc320937c1ba35ae6f592a24acdc93 /lib
parent07f97809b81553de5b6ecf0385bb8cd022eea1c1 (diff)
DONE: consider callback-aborted transfers premature
This bug report properly identified that when doing SMTP and aborting the transfer with a callback, it must be considered aborted prematurely by the code to avoid QUIT etc to be attempted as that would cause a hang. The new test case 1507 verifies this behavior. Reported by: Patricia Muscalu Bug: http://curl.haxx.se/bug/view.cgi?id=1184
Diffstat (limited to 'lib')
-rw-r--r--lib/url.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/url.c b/lib/url.c
index 918ce58c3..df70b69da 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -5219,6 +5219,13 @@ CURLcode Curl_done(struct connectdata **connp,
conn->dns_entry = NULL;
}
+ if(status == CURLE_ABORTED_BY_CALLBACK)
+ /* 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
+ many callbacks and protocols work differently, we could potentially do
+ this more fine-grained in the future. */
+ premature = TRUE;
+
/* this calls the protocol-specific function pointer previously set */
if(conn->handler->done)
result = conn->handler->done(conn, status, premature);