HTTPCLIENT-718: SSL verification occurs before setSoTimeout, which can lead to hangs
git-svn-id: https://svn.apache.org/repos/asf/jakarta/httpcomponents/httpclient/trunk@604462 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2370dc5fd3
commit
f696e1f684
|
@ -289,9 +289,11 @@ public class SSLSocketFactory implements LayeredSocketFactory {
|
|||
sslock.bind(isa);
|
||||
}
|
||||
|
||||
int timeout = HttpConnectionParams.getConnectionTimeout(params);
|
||||
sslock.connect(target, timeout);
|
||||
int connTimeout = HttpConnectionParams.getConnectionTimeout(params);
|
||||
int soTimeout = HttpConnectionParams.getSoTimeout(params);
|
||||
|
||||
sslock.connect(target, connTimeout);
|
||||
sslock.setSoTimeout(soTimeout);
|
||||
try {
|
||||
hostnameVerifier.verify(host, sslock);
|
||||
// verifyHostName() didn't blowup - good!
|
||||
|
|
Loading…
Reference in New Issue