summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-09-07 14:31:40 +0200
committerDaniel Stenberg <daniel@haxx.se>2018-09-07 14:33:22 +0200
commit4290cdf75706215d87850c60ceec198ae1a8477c (patch)
tree746cccb4368ee22ebae093cc02320e8409930168
parent7b655fcbadffc3a0297466f1527e05d4a8efe6b2 (diff)
downloadcurl-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
-rw-r--r--lib/http.c2
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