[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-897?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Oleg Kalnichevski resolved HTTPCLIENT-897.
------------------------------------------

    Resolution: Won't Fix

HttpClient 3.x code line is effectively end of life. Please consider upgrading 
to HttpClient 4.0

Oleg

> java.lang.IllegalStateException: unsupported protocol: "<host name>" when 
> using ConnectMethod
> ---------------------------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-897
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-897
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>         Environment: commons-httpclient-3.1.jar
>            Reporter: Barry Silis
>   Original Estimate: 0.08h
>  Remaining Estimate: 0.08h
>
> The method org.apache.commons.httpclient.ConnectMethod.getURI() omits the 
> protocol from the returned URI, causing an exception 
> *java.lang.IllegalStateException* when trying to use the class ConnectMethod.
> I believe it can be solved by not overriding 
> org.apache.commons.httpclient.HttpMethodBase.getURI() in the ConnectMethod 
> class.
> The exception:
> Exception in thread "main" java.lang.IllegalStateException: unsupported 
> protocol: 'www.google.com'
>       at 
> org.apache.commons.httpclient.protocol.Protocol.lazyRegisterProtocol(Protocol.java:149)
>       at 
> org.apache.commons.httpclient.protocol.Protocol.getProtocol(Protocol.java:117)
>       at 
> org.apache.commons.httpclient.HostConfiguration.setHost(HostConfiguration.java:253)
>       at 
> org.apache.commons.httpclient.HostConfiguration.setHost(HostConfiguration.java:315)
>       at 
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:388)
>       at 
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
>       at epicon.sbr.client.TestHttpGet.connectToProxy(TestHttpGet.java:293)
>       at epicon.sbr.client.TestHttpGet.main(TestHttpGet.java:41)
> Cheers,
> Barry.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Reply via email to