curl-library
Re: Write function called after abort
Date: Sat, 13 Aug 2005 23:29:22 +0200 (CEST)
On Sat, 13 Aug 2005, James Bursa wrote:
> I've found a case where the callback set by CURLOPT_WRITEFUNCTION is called
> once after a previous call returned 0 to abort the transfer.
That certainly is a very naughty server response.
Thanks for the source that made it very easy to detect and fix. The patch
below has also been committed to CVS just now:
--- transfer.c 12 Jul 2005 18:15:34 -0000 1.281
+++ transfer.c 13 Aug 2005 21:25:51 -0000
@@ -1134,6 +1134,8 @@
result = Curl_client_write(data, CLIENTWRITE_BODY,
data->state.headerbuff,
k->hbuflen);
+ if(result)
+ return result;
}
if(k->badheader < HEADER_ALLBAD) {
/* This switch handles various content encodings. If there's an
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2005-08-13