hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Internal change with last 4.2.3 with URI ?
Date Mon, 04 Mar 2013 16:02:10 GMT
On Mon, 2013-03-04 at 16:48 +0100, Olivier Lamy wrote:
> so BTW _ is not valid according to http://www.ietf.org/rfc/rfc2396.txt
> So forget my question :-)
> 

Oliver
Indeed, underscore character is not valid for use in DNS names. However
it is a very common violation HttpClient provides a work-around for. Try
using URIUtils#extractHost method in order to extract a HttpHost value
from a URI.

Hope this helps

Oleg

> 2013/3/4 Olivier Lamy <olamy@apache.org>:
> > 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
> 
> 
> 
> --
> Olivier Lamy
> Talend: http://coders.talend.com
> http://twitter.com/olamy | http://linkedin.com/in/olamy
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 



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


Mime
View raw message