[
https://issues.apache.org/jira/browse/HTTPCLIENT-2135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17283295#comment-17283295
]
Carter Kozak commented on HTTPCLIENT-2135:
------------------------------------------
I've configured the handshake timeout by setting a socket timeout in the socket
configuration while also setting a default RequestConfig with a responseTimeout
matching my expected timeout after the TLS handshake has succeeded.
I agree that it's confusing, and the ".setResponseTimeout" suggests something
different from the actual behavior. I've been considering contributing
something to split the request lifecycle timeouts into a few stages:
1. connect timeout (already in place)
2. handshake timeout (can be done in a roundabout way)
3. request write socket timeout: Used as a socket timeout while writing the
request headers and body to the socket
3. response timeout: Timeout used to block waiting for the first response byte
from the remote server
4. response read socket timeout: Used as a socket timeout after the first
response byte has been received.
I've mostly kept this idea to myself because I'm not actively blocked, and
unfortunately very busy with other work, but if it's useful to more people I
can prioritize building the feature in my spare time.
> TLS handshake timeouts cannot be controlled through RequestConfig
> -----------------------------------------------------------------
>
> Key: HTTPCLIENT-2135
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2135
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient (classic)
> Affects Versions: 5.0.3
> Reporter: Ryan Schmitt
> Priority: Major
>
> Apparently as a consequence of HTTPCLIENT-2091 and/or HTTPCLIENT-2099, TLS
> handshake timeouts can no longer be specified through any of the three
> {{RequestConfig}} timeout parameters (connect, connection request, response).
> The only way to limit TLS handshake duration is through low-level socket
> configuration (socket timeout), which of course affects more than just TLS
> handshakes.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]