urlpieces: remove members that live in peers/creds

Remove members of `struct urlpieces` that now live in peers/creds.

Change all remaining uses of those urlpieces.

When comparing schemes, use the protocol constants.

Closes #22171
This commit is contained in:
Stefan Eissing 2026-06-25 11:36:23 +02:00 committed by Daniel Stenberg
parent cfc7922377
commit 18475e662c
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
11 changed files with 65 additions and 54 deletions

View file

@ -2115,7 +2115,7 @@ static CURLcode http_target(struct Curl_easy *data,
return CURLE_OUT_OF_MEMORY;
}
if(curl_strequal("http", data->state.up.scheme)) {
if(data->state.origin->scheme == &Curl_scheme_http) {
/* when getting HTTP, we do not want the userinfo the URL */
uc = curl_url_set(h, CURLUPART_USER, NULL, 0);
if(uc) {
@ -2157,7 +2157,7 @@ static CURLcode http_target(struct Curl_easy *data,
if(result)
return result;
if(curl_strequal("ftp", data->state.up.scheme) &&
if((data->state.origin->scheme == &Curl_scheme_ftp) &&
data->set.proxy_transfer_mode) {
/* when doing ftp, append ;type=<a|i> if not present */
size_t len = strlen(path);