mirror of
https://github.com/curl/curl.git
synced 2026-04-18 20:21:40 +03:00
parent
6d0ee7b17b
commit
c85994d53b
1 changed files with 7 additions and 14 deletions
21
lib/http.c
21
lib/http.c
|
|
@ -4398,22 +4398,15 @@ static CURLcode http_parse_headers(struct Curl_easy *data,
|
|||
goto out; /* read more and try again */
|
||||
}
|
||||
|
||||
/* the size of the remaining (supposed) header line */
|
||||
/* the size of the remaining header line */
|
||||
consumed = (end_ptr - buf) + 1;
|
||||
|
||||
{
|
||||
/* preserve the whole original header piece size */
|
||||
size_t header_piece = consumed;
|
||||
|
||||
if(consumed) {
|
||||
result = curlx_dyn_addn(&data->state.headerb, buf, consumed);
|
||||
if(result)
|
||||
return result;
|
||||
blen -= consumed;
|
||||
buf += consumed;
|
||||
}
|
||||
*pconsumed += header_piece + unfold_len;
|
||||
}
|
||||
result = curlx_dyn_addn(&data->state.headerb, buf, consumed);
|
||||
if(result)
|
||||
return result;
|
||||
blen -= consumed;
|
||||
buf += consumed;
|
||||
*pconsumed += consumed + unfold_len;
|
||||
|
||||
/****
|
||||
* We now have a FULL header line in 'headerb'.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue