[
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/[EMAIL
PROTECTED]
[2]
http://mail-archives.apache.org/mod_mbox/jakarta-httpclient-user/200709.mbox/[EMAIL
PROTECTED]
[3]
http://mail-archives.apache.org/mod_mbox/jakarta-httpclient-user/200709.mbox/[EMAIL
PROTECTED]
> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]