Skip to content

HTTP/3: miss connection information of remote and local #9286

@Cering

Description

@Cering

I did this

  • Send http3 request, and print CURLINFO_PRIMARY_IP / CURLINFO_PRIMARY_PORT / CURLINFO_LOCAL_IP / CURLINFO_LOCAL_PORT
const char *url = "https://cloudflare-quic.com";
CURL *http_handle = curl_easy_init();
curl_easy_setopt(http_handle, CURLOPT_URL, url);
curl_easy_setopt(http_handle, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(http_handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_3);

for(int i=0; i<2; i++) {
    CURLcode res = curl_easy_perform(http_handle);
    if(res == CURLE_OK) {
        char *primary_ip = NULL;
        curl_easy_getinfo(http_handle, CURLINFO_PRIMARY_IP, &primary_ip);
        long primary_port = 0L;
        curl_easy_getinfo(http_handle, CURLINFO_PRIMARY_PORT, &primary_port);
        char *local_ip = NULL;
        curl_easy_getinfo(http_handle, CURLINFO_LOCAL_IP, &local_ip);
        long local_port = 0L;
        curl_easy_getinfo(http_handle, CURLINFO_LOCAL_PORT, &local_port);
        long num_connects = 0L;
        curl_easy_getinfo(http_handle, CURLINFO_NUM_CONNECTS, &num_connects);

        printf("primary %s:%d, local %s:%d, connects: %d\n", primary_ip, primary_port, local_ip, local_port, num_connects);
    }
    else
        printf("curl error %d\n", res);
}

I expected the following

  • The output info shows that information of remote and local is empty
primary :443, local :-1, connects: 1
primary :443, local :-1, connects: 0

curl/libcurl version

libcurl/7.83.0 BoringSSL zlib/1.2.7 brotli/1.0.9 nghttp2/1.41.0 quiche/0.12.0

operating system

Linux mylinux 3.10.0-693.21.1.el7.x86_64 #1 SMP Wed Mar 7 19:03:37 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    HTTP/3h3 or quic related

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions