diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/http.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/http.c b/lib/http.c index 1a313b4fb..e080ae513 100644 --- a/lib/http.c +++ b/lib/http.c @@ -3014,6 +3014,8 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data, { CURLcode result; struct SingleRequest *k = &data->req; + ssize_t onread = *nread; + char *ostr = k->str; /* header line within buffer loop */ do { @@ -3078,7 +3080,9 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data, else { /* this was all we read so it's all a bad header */ k->badheader = HEADER_ALLBAD; - *nread = (ssize_t)rest_length; + *nread = onread; + k->str = ostr; + return CURLE_OK; } break; } |