commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Barry Silis (JIRA)" <j...@apache.org>
Subject [jira] Created: (COMMONSSITE-47) java.lang.IllegalStateException: unsupported protocol: "<host name>" when using ConnectMethod
Date Mon, 07 Dec 2009 23:40:18 GMT
java.lang.IllegalStateException: unsupported protocol: "<host name>" when using ConnectMethod
---------------------------------------------------------------------------------------------

                 Key: COMMONSSITE-47
                 URL: https://issues.apache.org/jira/browse/COMMONSSITE-47
             Project: Commons All
          Issue Type: Bug
          Components: Site
         Environment: commons-httpclient-3.1.jar
            Reporter: Barry Silis


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.


Mime
View raw message