Added support for creating socks with the Scheme default port.

git-svn-id: https://svn.apache.org/repos/asf/jakarta/httpcomponents/httpclient/trunk@509901 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Becke 2007-02-21 05:48:46 +00:00
parent a21767dc9e
commit 1b6d7ea241
1 changed files with 3 additions and 1 deletions

View File

@ -135,7 +135,9 @@ public class DefaultClientConnectionOperator
conn.announce(sock);
sock = sf.connectSocket
(sock, target.getHostName(), target.getPort(), local, 0, params);
(sock, target.getHostName(),
target.getPort() == -1 ? schm.getDefaultPort() : target.getPort(),
local, 0, params);
prepareSocket(sock, context, params);
final boolean secure = sf.isSecure(sock);