urldata: remove the aptr struct

Move the two remaining fields into the state struct instead, within the
HTTP ifdef.

Also: make the AWS sigv4 code always rely on the http_host value. It
was previously conditionally trying to also work if it was not set, but
that logic was not creating an identical copy so it would fail.

Closes #22620
This commit is contained in:
Daniel Stenberg 2026-08-18 23:58:16 +02:00
parent 79132a1daf
commit 695aa15743
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
7 changed files with 34 additions and 42 deletions

View file

@ -132,7 +132,7 @@ static CURLcode dynhds_add_custom(struct Curl_easy *data,
/* trim surrounding whitespace so a padded field name (e.g.
`Authorization :`) cannot slip past the Authorization/Cookie check */
curlx_str_trimblanks(&name);
if(data->state.aptr.host &&
if(data->state.http_host &&
/* a Host: header was sent already, do not pass on any custom Host:
header as that will produce *two* in the same request! */
curlx_str_casecompare(&name, "Host"))