1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

James Bursa identified a libcurl HTTP bug and a good way to repeat it. If a

site responds with bad HTTP response that doesn't contain any header at all,
only a response body, and the write callback returns 0 to abort the
transfer, it didn't have any real effect but the write callback would be
called once more anyway.
This commit is contained in:
Daniel Stenberg 2005-08-13 21:28:46 +00:00
parent 9ad92b3007
commit 35110eca73

View File

@ -1134,6 +1134,8 @@ CURLcode Curl_readwrite(struct connectdata *conn,
result = Curl_client_write(data, CLIENTWRITE_BODY, result = Curl_client_write(data, CLIENTWRITE_BODY,
data->state.headerbuff, data->state.headerbuff,
k->hbuflen); k->hbuflen);
if(result)
return result;
} }
if(k->badheader < HEADER_ALLBAD) { if(k->badheader < HEADER_ALLBAD) {
/* This switch handles various content encodings. If there's an /* This switch handles various content encodings. If there's an