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 <curl-users_at_cool.haxx.se>
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.<https://gist.github.com/MrDwZ/3d9396ca385d1ad85f45c06df4a48688>

I ran against gdb with the master branch, I added one debug print as show in this commit<https://github.com/MrDwZ/curl/commit/ff3e520a75af4084608a0df7d4e424e555c0eced>

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 https://www.google.com 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 <daniel_at_haxx.se>
Date: Thursday, June 17, 2021 at 1:47 AM
To: Yongkang Huang <ykang_at_fb.com>
Cc: Yongkang Huang via curl-users <curl-users_at_cool.haxx.se>
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.

--

  / daniel.haxx.se
  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
  | https://www.wolfssl.com/contact/<https://www.wolfssl.com/contact/>

-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2021-06-17