diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-02-29 12:00:18 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-03-02 08:47:20 +0100 |
commit | 1460c1b92767cf1a8ca85ec4d375881b9e9d7452 (patch) | |
tree | 21d8ac9135c731ed660bd90fdae3ec3f7667c1f4 | |
parent | df207d2dd93b9e73c0550f62d8034bacecffbd20 (diff) | |
download | curl-bagder/http-zero-content-done.tar.gz |
http: mark POSTs with no body as "upload done" from the startbagder/http-zero-content-done
As we have logic that checks if we get a >= 400 reponse code back before
the upload is done, which then got confused since it wasn't "done" but
yet there was no data to send!
Reported-by: IvanoG on github
Fixes #4996
Closes #5002
-rw-r--r-- | lib/http.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/http.c b/lib/http.c index 39e4d3447..bff3adc17 100644 --- a/lib/http.c +++ b/lib/http.c @@ -3044,6 +3044,8 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) } if(result) return result; + if(!postsize) + data->req.upload_done = TRUE; if(data->req.writebytecount) { /* if a request-body has been sent off, we make sure this progress is noted |