Note that '_' isn't a valid hostname character:
http://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names

As an alternative, for your tests, you could try:
"https://foo-bar.example.com/";

Also, FWIW, you may want to consider using the "example.com" domain for
things where you need a hostname but don't intend to actually talk over
the network to it. The .example.com domain is specifically reserved for
this purpose. On the other hand, .online.com seems to resolve to CNET, so
this might end up having unexpected results for both you and CNET if you
continue using it for tests.

Jon

........
Jon Moore
Comcast Cable







On 3/4/13 10:41 AM, "Olivier Lamy" <ol...@apache.org> wrote:

>Hi Folks,
>recently Maven Wagon upgraded to last 4.2.3 client.
>
>Now url containing '_' doesn't work anymore.
>Exception says :
>
>java.lang.IllegalArgumentException: Host name may not be null
>at org.apache.http.HttpHost.<init>(HttpHost.java:79)
>
>Url have format: "https://foo_bar.online.com";
>
>When testing:
>URI uri = new URI("https://foo_bar.online.com";);
>
>String host = uri.getHost();
>
>host is null so I understand the complain :-).
>
>Is there any related change to use URI ?
>
>Do I have any workaround ?
>
>Thanks
>--
>Olivier Lamy
>Talend: http://coders.talend.com
>http://twitter.com/olamy | http://linkedin.com/in/olamy
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
>For additional commands, e-mail: httpclient-users-h...@hc.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
For additional commands, e-mail: httpclient-users-h...@hc.apache.org

Reply via email to