curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: libcurl appconnect_time is greater than starttransfer when using HTTPS proxy

From: Yongkang Huang via curl-users <>
Date: Thu, 17 Jun 2021 20:31:44 +0000

For some context we apply client authentication when connect to our HTTPs proxy, and here is the backtrace.<>

I ran against gdb with the master branch, I added one debug print as show in this commit<>

I also build the dev curl and tested, seems the first call to Curl_ssl_connect_nonblocking when connect proxy set the right time, but somehow the second call to set SSL connection to destination set a wrong time.

sudo curl $([some proxy cert set up]) -v -s -w "_at_/home/ykang/curl-format.txt" -o /dev/null 2>&1 | grep "time\|TIMER"
* TIMER_APPCONNECT set with value 208248, call in Curl_ssl_connect_nonblocking
* TIMER_APPCONNECT set with value 434095, call in Curl_ssl_connect_nonblocking
    time_namelookup: 0.000040
       time_connect: 0.199470
    time_appconnect: 0.434095
   time_pretransfer: 0.225913
time_starttransfer: 0.272836
         time_total: 0.274885

Hope it helps!

From: Daniel Stenberg <>
Date: Thursday, June 17, 2021 at 1:47 AM
To: Yongkang Huang <>
Cc: Yongkang Huang via curl-users <>
Subject: Re: libcurl appconnect_time is greater than starttransfer when using HTTPS proxy
On Fri, 11 Jun 2021, Yongkang Huang wrote:

> curl 7.77.0 (x86_64-pc-linux-gnu) libcurl/7.77.0 OpenSSL/1.1.1g-fips zlib/1.2.11
> Still repro for me 😐, is there any way I can match the timestamp with the
> verbose output to see how it matched with proxy/dst response?

Set a break-point in Curl_pgrsTime() and see when the timestamps are stored.


  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features

Received on 2021-06-17