mirror of
https://github.com/curl/curl.git
synced 2026-07-25 14:27:23 +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
|
|
@ -1820,8 +1820,9 @@ CURLcode Curl_http2_request_upgrade(struct dynbuf *req,
|
|||
return result;
|
||||
}
|
||||
|
||||
data->state.http_hd_upgrade = TRUE;
|
||||
data->state.http_hd_h2_settings = TRUE;
|
||||
result = curlx_dyn_addf(req,
|
||||
"Connection: Upgrade, HTTP2-Settings\r\n"
|
||||
"Upgrade: %s\r\n"
|
||||
"HTTP2-Settings: %s\r\n",
|
||||
NGHTTP2_CLEARTEXT_PROTO_VERSION_ID, base64);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue