altsvc: use Curl_peer in processing

Use `data->state.origin` when processing alt-avc information.

Decomplexify parsing function.

Closes #22184
This commit is contained in:
Stefan Eissing 2026-06-26 10:50:14 +02:00 committed by Daniel Stenberg
parent 2f1e94eaed
commit cfc7922377
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
7 changed files with 247 additions and 198 deletions

View file

@ -3208,9 +3208,7 @@ static CURLcode http_header_a(struct Curl_easy *data,
struct SingleRequest *k = &data->req;
enum alpnid id = (k->httpversion == 30) ? ALPN_h3 :
(k->httpversion == 20) ? ALPN_h2 : ALPN_h1;
return Curl_altsvc_parse(
data, data->asi, v, id, data->state.origin->hostname,
curlx_uitous((unsigned int)data->state.origin->port));
return Curl_altsvc_parse(data, data->asi, v, data->state.origin, id);
}
#else
(void)data;