[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13668223#comment-13668223
 ] 

Oleg Kalnichevski commented on HTTPCLIENT-1357:
-----------------------------------------------

It turns out that Oracle's implementation of 
SSLSocketFactory#createSocket(java.net.Socket, java.lang.String, int, boolean) 
has no problem accepting -1 as a port parameter. Google's implementation is 
apparently not so lenient. That explains why this bug does manifest itself when 
running on Oracle JREs.

Oleg
                
> Problem using HTTPS when using proxy
> ------------------------------------
>
>                 Key: HTTPCLIENT-1357
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1357
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.2.5
>         Environment: Use a repacked httpclient (repacked by jarjar) version 
> 4.2.5 on android 2.2.2
>            Reporter: raise
>             Fix For: 4.2.6, 4.3 Beta2
>
>
> 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. 
> In method updateSecureConnection, located  at file 
> org.apache.http.impl.conn.DefaultClientConnectionOperator.java, line 233, 
> should use  schm.resolvePort(target.getPort()) instead of target.getPort() to 
> avoid passing -1 as port. In android, ther is an patch review at 
> https://android-review.googlesource.com/#/c/15755/1/src/org/apache/http/impl/conn/DefaultClientConnectionOperator.java

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to