mirror of
https://github.com/curl/curl.git
synced 2026-07-24 11:57:16 +03:00
Curl_http(), decomplexify
Split out adding of individual request headers into a switch. Check the connection http version only on fresh connections, use separate methods. Add TE: header directly without allocation. Add bit for indicating Connection: header has been added and custom headers should not do that again. Closes #18444
This commit is contained in:
parent
e00cb001c6
commit
4d040c71d7
25 changed files with 345 additions and 319 deletions
|
|
@ -162,11 +162,6 @@ static CURLcode dynhds_add_custom(struct Curl_easy *data,
|
|||
we will force length zero then */
|
||||
hd_name_eq(name, namelen, STRCONST("Content-Length:")))
|
||||
;
|
||||
else if(data->state.aptr.te &&
|
||||
/* when asking for Transfer-Encoding, do not pass on a custom
|
||||
Connection: */
|
||||
hd_name_eq(name, namelen, STRCONST("Connection:")))
|
||||
;
|
||||
else if((httpversion >= 20) &&
|
||||
hd_name_eq(name, namelen, STRCONST("Transfer-Encoding:")))
|
||||
/* HTTP/2 and HTTP/3 do not support chunked requests */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue