connectdata: remove primary+secondary ip_quadruple

Since the content varies during connection setup and while doing it
(eyeballing), remove these strcut from `connectdata` and replace use
with querying the connection filters. Those keep that information
already.

Change the info logging of established connections to also give the
local address and port.

Closes #17960
This commit is contained in:
Stefan Eissing 2025-07-18 13:18:44 +02:00 committed by Daniel Stenberg
parent 450c00f983
commit 83da4d9d3b
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
13 changed files with 152 additions and 125 deletions

View file

@ -2674,6 +2674,7 @@ CURLcode Curl_http(struct Curl_easy *data, bool *done)
const char *p_accept; /* Accept: string */
unsigned char httpversion;
const char *alpn;
const char *info_version = NULL;
/* Always consider the DO phase done after this function call, even if there
may be parts of the request that are not yet sent, since we can deal with
@ -2682,19 +2683,20 @@ CURLcode Curl_http(struct Curl_easy *data, bool *done)
alpn = Curl_conn_get_alpn_negotiated(data, conn);
if(alpn && !strcmp("h3", alpn)) {
DEBUGASSERT(Curl_conn_http_version(data, conn) == 30);
info_version = "HTTP/3";
}
else if(alpn && !strcmp("h2", alpn)) {
#ifndef CURL_DISABLE_PROXY
if((Curl_conn_http_version(data, conn) != 20) &&
conn->bits.proxy && !conn->bits.tunnel_proxy
) {
conn->bits.proxy && !conn->bits.tunnel_proxy) {
result = Curl_http2_switch(data);
if(result)
goto fail;
}
else
#endif
DEBUGASSERT(Curl_conn_http_version(data, conn) == 20);
DEBUGASSERT(Curl_conn_http_version(data, conn) == 20);
info_version = "HTTP/2";
}
else {
/* Check if user wants to use HTTP/2 with clear TCP */
@ -2703,9 +2705,15 @@ CURLcode Curl_http(struct Curl_easy *data, bool *done)
result = Curl_http2_switch(data);
if(result)
goto fail;
info_version = "HTTP/2";
}
else
info_version = "HTTP/1.x";
}
if(info_version && !data->conn->bits.reuse)
infof(data, "using %s", info_version);
/* Add collecting of headers written to client. For a new connection,
* we might have done that already, but reuse
* or multiplex needs it here as well. */