summaryrefslogtreecommitdiff
path: root/lib/http.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-12-15 16:53:04 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-12-16 15:08:41 +0100
commiteb4cde16517e9c4e7d15fb1da96189379e1614c8 (patch)
treea1995b6e50eab833e67bfe6c5834ecd7b3946f03 /lib/http.c
parentd16fb4d0565487ba4c84fd8cc147759f3725a2d6 (diff)
downloadcurl-bagder/http-partial-header-send.tar.gz
http: show the request as headers even when split-sendingbagder/http-partial-header-send
When the initial request isn't possible to send in its entirety, the remainder of request would be delivered to the debug callback as data and would wrongly be counted internally as body-bytes sent. Extended test 1295 to verify. Closes #6328
Diffstat (limited to 'lib/http.c')
-rw-r--r--lib/http.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/http.c b/lib/http.c
index c232ed413..a2279eb0a 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -1294,6 +1294,9 @@ CURLcode Curl_buffer_send(struct dynbuf *in,
http->postdata = ptr;
http->postsize = (curl_off_t)size;
+ /* this much data is remaining header: */
+ data->req.pendingheader = headersize - headlen;
+
http->send_buffer = *in; /* copy the whole struct */
http->sending = HTTPSEND_REQUEST;
@@ -1316,6 +1319,8 @@ CURLcode Curl_buffer_send(struct dynbuf *in,
}
Curl_dyn_free(in);
+ /* no remaining header data */
+ data->req.pendingheader = 0;
return result;
}