urldata: move cookiehost to struct SingleRequest

To make it scoped for the single request appropriately.

Reported-by: Muhamad Arga Reksapati

Verify with libtest 2504: a custom Host *disabled* on reused handle

Closes #21312
This commit is contained in:
Daniel Stenberg 2026-04-14 08:51:44 +02:00
parent 86f1e5b3f6
commit 3a19987a87
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
9 changed files with 162 additions and 12 deletions

View file

@ -290,7 +290,7 @@ CURLcode Curl_close(struct Curl_easy **datap)
curlx_safefree(data->state.aptr.ref);
curlx_safefree(data->state.aptr.host);
#ifndef CURL_DISABLE_COOKIES
curlx_safefree(data->state.aptr.cookiehost);
curlx_safefree(data->req.cookiehost);
#endif
#ifndef CURL_DISABLE_RTSP
curlx_safefree(data->state.aptr.rtsp_transport);