On Mar 23, 2010, at 9:43am, <[email protected]> <[email protected] > 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:[email protected]]
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, [email protected] 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:[email protected]]
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, <[email protected]>
<[email protected]
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: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



--------------------------------------------
<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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to