hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roland Weber (JIRA)" <j...@apache.org>
Subject [jira] Closed: (HTTPCLIENT-694) Error connection refused when use url with "_"
Date Fri, 28 Sep 2007 15:30:50 GMT

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

Roland Weber closed HTTPCLIENT-694.
-----------------------------------

    Resolution: Won't Fix

Hello Florindo,

as discussed [1] recently on the user list, underscores are not valid characters in host names.[2]
The URI class in HttpClient 3.x will fail to parse the port number if an underscore is in
the host name.
This will not be fixed anymore in the 3.x codebase. HttpClient 4.0 uses java.net.URI instead.[3]

cheers,
  Roland

[1] http://mail-archives.apache.org/mod_mbox/jakarta-httpclient-user/200709.mbox/%3cD4E9D905B6EA19498B9BB647FAB2EB931B6ADE@HPSERVER1.office.invenso.com%3e
[2] http://mail-archives.apache.org/mod_mbox/jakarta-httpclient-user/200709.mbox/%3c25aac9fc0709060913y5b8ea254y8edbb6dc5faf693f@mail.gmail.com%3e
[3] http://mail-archives.apache.org/mod_mbox/jakarta-httpclient-user/200709.mbox/%3c1189089932.8588.37.camel@okhost%3e



> Error connection refused when use url with "_"
> ----------------------------------------------
>
>                 Key: HTTPCLIENT-694
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-694
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 3.1 Final
>         Environment: Sun Solaris 8.0, jdk 1.4.1
>            Reporter: Florindo Buono
>
> Hi,
> I'm a developer that use commons-httpclient-3.0.1.jar. It work fine, but when I use an
url with character "_" i have problem to connection refused. In my case we have this url:

> http://L009_info.collaudo.it:10000/sim/GWHttp
> I have try to modify the url on server replacing "_" whit "." and the post working fine:

> http://L009.info.collaudo.it:10000/sim/GWHttp
> Following code that my code:
> try {
>     HttpClient client = new HttpClient();
>     String urlconnect  = "http://L009_info.collaudo.it:10000/sim/GWHttp";
>     client.getHttpConnectionManager().getParams().setConnectionTimeout(timeout);
>     client.getHttpConnectionManager().getParams().setSoTimeout(timeout);
>     PostMethod httpPost = new PostMethod(urlconnect);
>     client.executeMethod(httpPost);
> } catch (IOException e) {
>       logger.error("Unable to connect to '" + urlconnect + "': [" + e.toString() +"]");
> }
> The log is:
> [2007-09-26 17:27:40,507] [be_ra02] [AgComSenderTask] [AgComSenderTask] [AgComSenderTask-1190820460140]
[MSISDN] [ERROR ] [HTTPProcessor] Unable to connect to 'http://L009_info.collaudo.it:10000/sim/GWHttp':
[java.net.ConnectException: Connection refused]
> I have try to replace "_" with "%5F" but I have the same error.
> Do you have a problem to manage "_"? 
> Need I to encode "_"?
> Thanks in advanced.
> Regards.

-- 
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: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


Mime
View raw message