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:
Stefan Eissing 2025-09-01 15:52:30 +02:00 committed by Daniel Stenberg
parent e00cb001c6
commit 4d040c71d7
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
25 changed files with 345 additions and 319 deletions

View file

@ -106,7 +106,7 @@ CURLcode Curl_add_custom_headers(struct Curl_easy *data, bool is_connect,
CURLcode Curl_dynhds_add_custom(struct Curl_easy *data, bool is_connect,
struct dynhds *hds);
void Curl_http_method(struct Curl_easy *data, struct connectdata *conn,
void Curl_http_method(struct Curl_easy *data,
const char **method, Curl_HttpReq *);
/* protocol-specific functions set up to be called by the main engine */