urldata: remove fields not used depending on used features

Reduced size of dynamically_allocated_data structure.

Reduced number of stored values in enum dupstring and enum dupblob. This
affects the reduced array placed in the UserDefined structure.

Closes #13188
This commit is contained in:
MAntoniak 2024-03-26 00:19:23 +01:00 committed by Daniel Stenberg
parent 11d27cf341
commit f46385d36d
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
14 changed files with 157 additions and 44 deletions

View file

@ -980,11 +980,13 @@ CURLcode Curl_http(struct Curl_easy *data, bool *done)
goto error;
}
#ifndef CURL_DISABLE_PROXY
if(data->state.aptr.proxyuserpwd) {
result = Curl_hyper_header(data, headers, data->state.aptr.proxyuserpwd);
if(result)
goto error;
}
#endif
if(data->state.aptr.userpwd) {
result = Curl_hyper_header(data, headers, data->state.aptr.userpwd);
@ -1137,7 +1139,9 @@ CURLcode Curl_http(struct Curl_easy *data, bool *done)
/* clear userpwd and proxyuserpwd to avoid reusing old credentials
* from reused connections */
Curl_safefree(data->state.aptr.userpwd);
#ifndef CURL_DISABLE_PROXY
Curl_safefree(data->state.aptr.proxyuserpwd);
#endif
return CURLE_OK;
error:
DEBUGASSERT(result);