aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-02-29 12:00:18 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-03-02 15:43:04 +0100
commit0caae3c4be47c7859eb1f26ffa7a0cf4b5a82160 (patch)
tree1abbcce2a31d6c689bde57551542139ee489ebdf /lib
parent5494afac8fc0adcfe8995f525e7aa82d1ceb3d7e (diff)
http: mark POSTs with no body as "upload done" from the start
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
Diffstat (limited to 'lib')
-rw-r--r--lib/http.c2
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