mirror of
https://github.com/curl/curl.git
synced 2026-08-26 09:33:33 +03:00
- "Tom" posted a bug report that mentioned how libcurl did wrong when doing a
POST using a read callback, with Digest authentication and "Transfer-Encoding: chunked" enforced. I would then cause the first request to be wrongly sent and then basically hang until the server closed the connection. I fixed the problem and added test case 565 to verify it.
This commit is contained in:
parent
0a5ac52b49
commit
d68f215f03
7 changed files with 133 additions and 4 deletions
12
lib/http.c
12
lib/http.c
|
|
@ -2905,7 +2905,17 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
|
|||
if(result)
|
||||
return result;
|
||||
|
||||
if(data->set.postfieldsize) {
|
||||
if(data->req.upload_chunky && conn->bits.authneg) {
|
||||
/* Chunky upload is selected and we're negotiating auth still, send
|
||||
end-of-data only */
|
||||
result = add_buffer(req_buffer,
|
||||
"\x0d\x0a\x30\x0d\x0a\x0d\x0a", 7);
|
||||
/* CR LF 0 CR LF CR LF */
|
||||
if(result)
|
||||
return result;
|
||||
}
|
||||
|
||||
else if(data->set.postfieldsize) {
|
||||
/* set the upload size to the progress meter */
|
||||
Curl_pgrsSetUploadSize(data, postsize?postsize:-1);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue