HTTPCLIENT-1357: Connection upgrade operation does not resolve default port (-1) to a scheme default value which can lead to a InvalidArgumentException on some platforms

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1486900 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oleg Kalnichevski 2013-05-28 12:14:19 +00:00
parent fc37a11561
commit 6fad24aef2
1 changed files with 1 additions and 1 deletions

View File

@ -218,7 +218,7 @@ public class DefaultClientConnectionOperator implements ClientConnectionOperator
Socket sock; Socket sock;
try { try {
sock = lsf.createLayeredSocket( sock = lsf.createLayeredSocket(
conn.getSocket(), target.getHostName(), target.getPort(), params); conn.getSocket(), target.getHostName(), schm.resolvePort(target.getPort()), params);
} catch (final ConnectException ex) { } catch (final ConnectException ex) {
throw new HttpHostConnectException(target, ex); throw new HttpHostConnectException(target, ex);
} }