summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Sandblad <andreas.sandblad@sonyericsson.com>2010-07-13 13:18:27 +0200
committerJohan Redestig <johan.redestig@sonyericsson.com>2010-07-13 13:18:27 +0200
commit9340bb2a4b5f828b418c0e77492dde148623c938 (patch)
treee44cb414b2accfb1160621c63b57e39913adfffa
parent2e9f166eba309e50c1c1f52ff8d2694f058ab2cf (diff)
downloadexternal_apache-http-9340bb2a4b5f828b418c0e77492dde148623c938.zip
external_apache-http-9340bb2a4b5f828b418c0e77492dde148623c938.tar.gz
external_apache-http-9340bb2a4b5f828b418c0e77492dde148623c938.tar.bz2
Fixed problem using HTTPS with Apache HTTP Client when using proxy
Problem described at: http://code.google.com/p/android/issues/detail?id=2690 The fix is to set default port for scheme to avoid passing -1 as port, which would cause an IllegalArgumentException. Change-Id: Ib1324618cdb6e3aa629dea2a2de1856136223aaf
-rw-r--r--src/org/apache/http/impl/conn/DefaultClientConnectionOperator.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/org/apache/http/impl/conn/DefaultClientConnectionOperator.java b/src/org/apache/http/impl/conn/DefaultClientConnectionOperator.java
index 67e6bb0..fbc762d 100644
--- a/src/org/apache/http/impl/conn/DefaultClientConnectionOperator.java
+++ b/src/org/apache/http/impl/conn/DefaultClientConnectionOperator.java
@@ -223,7 +223,7 @@ public class DefaultClientConnectionOperator
final Socket sock;
try {
sock = lsf.createSocket
- (conn.getSocket(), target.getHostName(), target.getPort(), true);
+ (conn.getSocket(), target.getHostName(), schm.resolvePort(target.getPort()), true);
} catch (ConnectException ex) {
throw new HttpHostConnectException(target, ex);
}