mirror of
https://github.com/curl/curl.git
synced 2026-07-24 20:17:17 +03:00
retry-request: rewind if data was sent
When libcurl sends a HTTP request on a re-used connection and detects it being closed (ie no data at all was read from it), it is important to rewind if any data in the request was sent using the read callback or was read from file, as otherwise the retried request will be broken. Reported by: Chris Smowton Bug: http://curl.haxx.se/bug/view.cgi?id=3195205
This commit is contained in:
parent
0355e33b5f
commit
058fb33557
1 changed files with 3 additions and 0 deletions
|
|
@ -2085,6 +2085,9 @@ CURLcode Curl_retry_request(struct connectdata *conn,
|
|||
prevent i.e HTTP transfers to return
|
||||
error just because nothing has been
|
||||
transfered! */
|
||||
|
||||
if(data->state.proto.http->writebytecount)
|
||||
Curl_readrewind(conn);
|
||||
}
|
||||
return CURLE_OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue