auth: cleanups

- rename `req->proxyuserpwd` to `req->hd_proxy_auth`
- rename `req->userpwd` to `req->hd_auth`
- rename parameter `proxytunnel` to `is_connect` for Curl_http_output_auth()
- move path+query concatenation into Curl_http_output_auth(), saving an alloc when no auth is in play
- rename `H1_HD_USER_AUTH` into `H1_HD_AUTH`

Closes #21513
This commit is contained in:
Stefan Eissing 2026-05-06 13:44:16 +02:00 committed by Daniel Stenberg
parent 71a5725563
commit fdd27a538c
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
12 changed files with 100 additions and 113 deletions

View file

@ -65,9 +65,9 @@ CURLcode Curl_req_soft_reset(struct SingleRequest *req,
req->httpversion = 0;
req->sendbuf_hds_len = 0;
curlx_safefree(req->userpwd);
curlx_safefree(req->hd_auth);
#ifndef CURL_DISABLE_PROXY
curlx_safefree(req->proxyuserpwd);
curlx_safefree(req->hd_proxy_auth);
#endif
result = Curl_client_start(data);
@ -115,9 +115,9 @@ void Curl_req_hard_reset(struct SingleRequest *req, struct Curl_easy *data)
struct curltime t0 = { 0, 0 };
curlx_safefree(req->newurl);
curlx_safefree(req->userpwd);
curlx_safefree(req->hd_auth);
#ifndef CURL_DISABLE_PROXY
curlx_safefree(req->proxyuserpwd);
curlx_safefree(req->hd_proxy_auth);
#endif
#ifndef CURL_DISABLE_COOKIES
curlx_safefree(req->cookiehost);
@ -175,9 +175,9 @@ void Curl_req_hard_reset(struct SingleRequest *req, struct Curl_easy *data)
void Curl_req_free(struct SingleRequest *req, struct Curl_easy *data)
{
curlx_safefree(req->newurl);
curlx_safefree(req->userpwd);
curlx_safefree(req->hd_auth);
#ifndef CURL_DISABLE_PROXY
curlx_safefree(req->proxyuserpwd);
curlx_safefree(req->hd_proxy_auth);
#endif
if(req->sendbuf_init)
Curl_bufq_free(&req->sendbuf);