diff options
author | Daniel Stenberg <daniel@haxx.se> | 2018-09-07 14:31:40 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-09-07 14:33:22 +0200 |
commit | 4290cdf75706215d87850c60ceec198ae1a8477c (patch) | |
tree | 746cccb4368ee22ebae093cc02320e8409930168 /lib/http.c | |
parent | 7b655fcbadffc3a0297466f1527e05d4a8efe6b2 (diff) | |
download | curl-bagder/http-buffer-send.tar.gz |
http: fix write counter in Curl_add_buffer_sendbagder/http-buffer-send
A problem would occur if the entire buffer couldn't be sent at once and
it could cause an infinte POST loop.
Reported-by: vfloyd6 on github
Fixes #2947
Diffstat (limited to 'lib/http.c')
-rw-r--r-- | lib/http.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/http.c b/lib/http.c index e727ed823..8353dc40c 100644 --- a/lib/http.c +++ b/lib/http.c @@ -1212,7 +1212,7 @@ CURLcode Curl_add_buffer_send(Curl_send_buffer *in, if(http) { /* if we sent a piece of the body here, up the byte counter for it accordingly */ - http->writebytecount += bodylen; + http->writebytecount += amount; if((size_t)amount != size) { /* The whole request could not be sent in one system call. We must |