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

@ -2108,3 +2108,20 @@ bool Curl_url_same_origin(CURLU *base, CURLU *href)
return FALSE;
return TRUE;
}
CURLUcode Curl_url_get_port(CURLU *u, uint16_t *pport)
{
if(u->port_present) {
*pport = u->portnum;
return CURLUE_OK;
}
else if(u->scheme) {
const struct Curl_scheme *s = Curl_get_scheme(u->scheme);
if(s && s->defport) {
*pport = s->defport;
return CURLUE_OK;
}
}
*pport = 0;
return CURLUE_NO_PORT;
}