You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2009/12/08 02:12:18 UTC
[jira] Moved: (HTTPCLIENT-897) java.lang.IllegalStateException:
unsupported protocol: "" when using ConnectMethod
[ https://issues.apache.org/jira/browse/HTTPCLIENT-897?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sebb moved COMMONSSITE-47 to HTTPCLIENT-897:
--------------------------------------------
Component/s: (was: Site)
HttpClient
Key: HTTPCLIENT-897 (was: COMMONSSITE-47)
Project: HttpComponents HttpClient (was: Commons All)
> 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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org