Fix appconnect time problematic accumulation when using TLS-in-TLS proxy #7274
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Follow up this email list thread.
We use a TLS-in-TLS HTTPS proxy with proxy client auth required setup, the appconnect time accumulated twice and exceeds the total time.
I found this seems to caused by a potential bug in
Curl_pgrsTime
, the problem is when we use TLS-in-TLS proxy,Curl_ssl_connect_nonblocking
called twice, as we need to build TLS connection to proxy and followed by destination. See this stack trace. The current implementation would be:My commit changes t_appconnect to only record the time that TLS has been established to destination, as both TLS connection finished.
I know we accumulate some timerid because of redirection, any suggestion would be welcome if there's anything is wrong with this PR. :-)
I tested by building locally and the appconnect time is less than all the following time.
Before
After