SSLSocketFactory to use javax.net.ssl.SSLSocketFactory#createSocket() instead of new Socket()

Contributed by Mark Claassen <mac01at donnell.com>

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1311409 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oleg Kalnichevski 2012-04-09 20:10:18 +00:00
parent 0fb328d01c
commit db9f011a83
1 changed files with 1 additions and 1 deletions

View File

@ -518,7 +518,7 @@ public class SSLSocketFactory implements SchemeLayeredSocketFactory,
if (params == null) {
throw new IllegalArgumentException("HTTP parameters may not be null");
}
Socket sock = socket != null ? socket : new Socket();
Socket sock = socket != null ? socket : this.socketfactory.createSocket();
if (localAddress != null) {
sock.setReuseAddress(HttpConnectionParams.getSoReuseaddr(params));
sock.bind(localAddress);