summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-02-27 22:30:32 +0100
committerDaniel Stenberg <daniel@haxx.se>2019-02-27 22:30:32 +0100
commita066f8d16f1575af91b85b67d9de7c475ff0f9ad (patch)
tree893b9165ec38983fd40f85cdf84bbce3ef8e02a3
parenteb433389411f778ed8e6b516a5b8fa35d57564ef (diff)
downloadcurl-bagder/http-formpost-infilesize.tar.gz
http: set state.infilesize when sending formpostsbagder/http-formpost-infilesize
Without it set, we would unwillingly triger the "HTTP error before end of send, stop sending" condition even if the entire POST body had been sent (since it wouldn't know the expected size) which would unnecessarily log that message and close the connection when it didn't have to. Reported-by: Matt McClure Bug: https://curl.haxx.se/mail/archive-2019-02/0023.html
-rw-r--r--lib/http.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/http.c b/lib/http.c
index eb81aae71..9f44b8a68 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -2733,7 +2733,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
break;
}
- postsize = http->postsize;
+ data->state.infilesize = postsize = http->postsize;
/* We only set Content-Length and allow a custom Content-Length if
we don't upload data chunked, as RFC2616 forbids us to set both