You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Na...@emc.com on 2010/03/22 22:15:20 UTC

URL/URI syntax issue in HC 4.0.1

The URL, http://win2k3_64_ora:9300/app, seems to be correct and works in
internet browser. However, the client that goes through HC  4.0.1 could
not connect. The '_' in hostname seems to cause this issue. We noticed
this issue in earlier version of HC. 

 

Any ideas or workaround to resolve this issue?

 

Thanks

Valli


Re: URL/URI syntax issue in HC 4.0.1

Posted by Oleg Kalnichevski <ol...@apache.org>.
Natarajan_Valli@emc.com wrote:
> In the example URL, there is no domain name and underscore is permitted in hostname according to this http://www.w3.org/Addressing/URL/5_BNF.html
> 

Which is completely irrelevant, because HttpClient uses standard 
java.net.URI implementation, whose behavior is defined by the newer 
standard RFC2396.

http://www.ietf.org/rfc/rfc2396.txt

URI specification supersedes that of URL.

RFC2396 does not permit underscore neither in domain nor host names.

Oleg


> Thanks
> Valli
> 
> -----Original Message-----
> From: Oleg Kalnichevski [mailto:olegk@apache.org] 
> Sent: Tuesday, March 23, 2010 6:31 AM
> To: HttpClient User Discussion
> Subject: RE: URL/URI syntax issue in HC 4.0.1
> 
> On Tue, 2010-03-23 at 00:00 -0400, Natarajan_Valli@emc.com wrote:
>> Ken, 
>>
>> Thank you for information. 
>>
>> AFAIK, this is valid URL (not malformed). 
> 
> Wrong. Underscore is not a permitted character in any domain name.
> 
>> Anyway, I will try to
>> workaround using httpcore directly. Can we use both HttpCore &
>> HttpClient APIs together? 
>>
> 
> Yes, you can. HttpClient uses HttpCore internally.
> 
> Oleg
> 
> 
>> Thanks
>> Valli
>>
>> -----Original Message-----
>> From: Ken Krugler [mailto:kkrugler_lists@transpac.com] 
>> Sent: Monday, March 22, 2010 2:39 PM
>> To: HttpClient User Discussion
>> Subject: Re: URL/URI syntax issue in HC 4.0.1
>>
>>
>> On Mar 22, 2010, at 2:15pm, <Na...@emc.com>
>> <Natarajan_Valli@emc.com 
>>  > wrote:
>>
>>> The URL, http://win2k3_64_ora:9300/app, seems to be correct and  
>>> works in
>>> internet browser. However, the client that goes through HC  4.0.1  
>>> could
>>> not connect. The '_' in hostname seems to cause this issue. We noticed
>>> this issue in earlier version of HC.
>>>
>>>
>>>
>>> Any ideas or workaround to resolve this issue?
>> See past discussion on this list, and
>> https://issues.apache.org/jira/browse/HTTPCLIENT-900
>>
>> Currently the standard suggestion from Oleg is to use HttpCore  
>> directly, if you need to work with non-compliant URIs.
>>
>> -- Ken
>>
>> --------------------------------------------
>> Ken Krugler
>> +1 530-210-6378
>> http://bixolabs.com
>> e l a s t i c   w e b   m i n i n g
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>>
> 
> 
> 
> ---------------------------------------------------------------------
> 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


Re: URL/URI syntax issue in HC 4.0.1

Posted by Ken Krugler <kk...@transpac.com>.
On Mar 23, 2010, at 9:43am, <Na...@emc.com> <Natarajan_Valli@emc.com 
 > wrote:

> In the example URL, there is no domain name

Which URL are you referring to? If it's "http://win2k3_64_ora:9300/ 
app", then you're right that you can form a URI from it without  
getting an exception, but it has no host name which means it will  
still fail.

Most browsers will silently try to add a ".com" if your URL doesn't  
have a hostname, so you can't have the same expectations about  
HttpClient. A better test is what happens when you use curl with that  
URL.

-- Ken


> -----Original Message-----
> From: Oleg Kalnichevski [mailto:olegk@apache.org]
> Sent: Tuesday, March 23, 2010 6:31 AM
> To: HttpClient User Discussion
> Subject: RE: URL/URI syntax issue in HC 4.0.1
>
> On Tue, 2010-03-23 at 00:00 -0400, Natarajan_Valli@emc.com wrote:
>> Ken,
>>
>> Thank you for information.
>>
>> AFAIK, this is valid URL (not malformed).
>
> Wrong. Underscore is not a permitted character in any domain name.
>
>> Anyway, I will try to
>> workaround using httpcore directly. Can we use both HttpCore &
>> HttpClient APIs together?
>>
>
> Yes, you can. HttpClient uses HttpCore internally.
>
> Oleg
>
>
>> Thanks
>> Valli
>>
>> -----Original Message-----
>> From: Ken Krugler [mailto:kkrugler_lists@transpac.com]
>> Sent: Monday, March 22, 2010 2:39 PM
>> To: HttpClient User Discussion
>> Subject: Re: URL/URI syntax issue in HC 4.0.1
>>
>>
>> On Mar 22, 2010, at 2:15pm, <Na...@emc.com>
>> <Natarajan_Valli@emc.com
>>> wrote:
>>
>>> The URL, http://win2k3_64_ora:9300/app, seems to be correct and
>>> works in
>>> internet browser. However, the client that goes through HC  4.0.1
>>> could
>>> not connect. The '_' in hostname seems to cause this issue. We  
>>> noticed
>>> this issue in earlier version of HC.
>>>
>>>
>>>
>>> Any ideas or workaround to resolve this issue?
>>
>> See past discussion on this list, and
>> https://issues.apache.org/jira/browse/HTTPCLIENT-900
>>
>> Currently the standard suggestion from Oleg is to use HttpCore
>> directly, if you need to work with non-compliant URIs.
>>
>> -- Ken
>>
>> --------------------------------------------
>> Ken Krugler
>> +1 530-210-6378
>> http://bixolabs.com
>> e l a s t i c   w e b   m i n i n g
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>

--------------------------------------------
<http://ken-blog.krugler.org>
+1 530-265-2225




--------------------------------------------
Ken Krugler
+1 530-210-6378
http://bixolabs.com
e l a s t i c   w e b   m i n i n g





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


RE: URL/URI syntax issue in HC 4.0.1

Posted by Na...@emc.com.
In the example URL, there is no domain name and underscore is permitted in hostname according to this http://www.w3.org/Addressing/URL/5_BNF.html

Thanks
Valli

-----Original Message-----
From: Oleg Kalnichevski [mailto:olegk@apache.org] 
Sent: Tuesday, March 23, 2010 6:31 AM
To: HttpClient User Discussion
Subject: RE: URL/URI syntax issue in HC 4.0.1

On Tue, 2010-03-23 at 00:00 -0400, Natarajan_Valli@emc.com wrote:
> Ken, 
> 
> Thank you for information. 
> 
> AFAIK, this is valid URL (not malformed). 

Wrong. Underscore is not a permitted character in any domain name.

> Anyway, I will try to
> workaround using httpcore directly. Can we use both HttpCore &
> HttpClient APIs together? 
> 

Yes, you can. HttpClient uses HttpCore internally.

Oleg


> Thanks
> Valli
> 
> -----Original Message-----
> From: Ken Krugler [mailto:kkrugler_lists@transpac.com] 
> Sent: Monday, March 22, 2010 2:39 PM
> To: HttpClient User Discussion
> Subject: Re: URL/URI syntax issue in HC 4.0.1
> 
> 
> On Mar 22, 2010, at 2:15pm, <Na...@emc.com>
> <Natarajan_Valli@emc.com 
>  > wrote:
> 
> > The URL, http://win2k3_64_ora:9300/app, seems to be correct and  
> > works in
> > internet browser. However, the client that goes through HC  4.0.1  
> > could
> > not connect. The '_' in hostname seems to cause this issue. We noticed
> > this issue in earlier version of HC.
> >
> >
> >
> > Any ideas or workaround to resolve this issue?
> 
> See past discussion on this list, and
> https://issues.apache.org/jira/browse/HTTPCLIENT-900
> 
> Currently the standard suggestion from Oleg is to use HttpCore  
> directly, if you need to work with non-compliant URIs.
> 
> -- Ken
> 
> --------------------------------------------
> Ken Krugler
> +1 530-210-6378
> http://bixolabs.com
> e l a s t i c   w e b   m i n i n g
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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
> 



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



RE: URL/URI syntax issue in HC 4.0.1

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Tue, 2010-03-23 at 00:00 -0400, Natarajan_Valli@emc.com wrote:
> Ken, 
> 
> Thank you for information. 
> 
> AFAIK, this is valid URL (not malformed). 

Wrong. Underscore is not a permitted character in any domain name.

> Anyway, I will try to
> workaround using httpcore directly. Can we use both HttpCore &
> HttpClient APIs together? 
> 

Yes, you can. HttpClient uses HttpCore internally.

Oleg


> Thanks
> Valli
> 
> -----Original Message-----
> From: Ken Krugler [mailto:kkrugler_lists@transpac.com] 
> Sent: Monday, March 22, 2010 2:39 PM
> To: HttpClient User Discussion
> Subject: Re: URL/URI syntax issue in HC 4.0.1
> 
> 
> On Mar 22, 2010, at 2:15pm, <Na...@emc.com>
> <Natarajan_Valli@emc.com 
>  > wrote:
> 
> > The URL, http://win2k3_64_ora:9300/app, seems to be correct and  
> > works in
> > internet browser. However, the client that goes through HC  4.0.1  
> > could
> > not connect. The '_' in hostname seems to cause this issue. We noticed
> > this issue in earlier version of HC.
> >
> >
> >
> > Any ideas or workaround to resolve this issue?
> 
> See past discussion on this list, and
> https://issues.apache.org/jira/browse/HTTPCLIENT-900
> 
> Currently the standard suggestion from Oleg is to use HttpCore  
> directly, if you need to work with non-compliant URIs.
> 
> -- Ken
> 
> --------------------------------------------
> Ken Krugler
> +1 530-210-6378
> http://bixolabs.com
> e l a s t i c   w e b   m i n i n g
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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
> 



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


RE: URL/URI syntax issue in HC 4.0.1

Posted by Na...@emc.com.
Ken, 

Thank you for information. 

AFAIK, this is valid URL (not malformed). Anyway, I will try to
workaround using httpcore directly. Can we use both HttpCore &
HttpClient APIs together? 

Thanks
Valli

-----Original Message-----
From: Ken Krugler [mailto:kkrugler_lists@transpac.com] 
Sent: Monday, March 22, 2010 2:39 PM
To: HttpClient User Discussion
Subject: Re: URL/URI syntax issue in HC 4.0.1


On Mar 22, 2010, at 2:15pm, <Na...@emc.com>
<Natarajan_Valli@emc.com 
 > wrote:

> The URL, http://win2k3_64_ora:9300/app, seems to be correct and  
> works in
> internet browser. However, the client that goes through HC  4.0.1  
> could
> not connect. The '_' in hostname seems to cause this issue. We noticed
> this issue in earlier version of HC.
>
>
>
> Any ideas or workaround to resolve this issue?

See past discussion on this list, and
https://issues.apache.org/jira/browse/HTTPCLIENT-900

Currently the standard suggestion from Oleg is to use HttpCore  
directly, if you need to work with non-compliant URIs.

-- Ken

--------------------------------------------
Ken Krugler
+1 530-210-6378
http://bixolabs.com
e l a s t i c   w e b   m i n i n g





---------------------------------------------------------------------
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


Re: URL/URI syntax issue in HC 4.0.1

Posted by Ken Krugler <kk...@transpac.com>.
On Mar 22, 2010, at 2:15pm, <Na...@emc.com> <Natarajan_Valli@emc.com 
 > wrote:

> The URL, http://win2k3_64_ora:9300/app, seems to be correct and  
> works in
> internet browser. However, the client that goes through HC  4.0.1  
> could
> not connect. The '_' in hostname seems to cause this issue. We noticed
> this issue in earlier version of HC.
>
>
>
> Any ideas or workaround to resolve this issue?

See past discussion on this list, and https://issues.apache.org/jira/browse/HTTPCLIENT-900

Currently the standard suggestion from Oleg is to use HttpCore  
directly, if you need to work with non-compliant URIs.

-- Ken

--------------------------------------------
Ken Krugler
+1 530-210-6378
http://bixolabs.com
e l a s t i c   w e b   m i n i n g





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