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 Eugeny N Dzhurinsky <bo...@redwerk.com> on 2006/11/16 15:30:59 UTC

http:///

When trying to access link http:///, HttoClient tries to access local host
instead of trowing some kind of exception for empty host name.

Is it bug or a feature?
-- 
Eugene N Dzhurinsky

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


Re: http:///

Posted by Roland Weber <ht...@dubioso.net>.
Hello Eugeny,

> When trying to access link http:///, HttoClient tries to access local host
> instead of trowing some kind of exception for empty host name.
> 
> Is it bug or a feature?

RFC 3986 says it's a bug. Page 20:

   If the URI scheme defines a default for host, then that default
   applies when the host subcomponent is undefined or when the
   registered name is empty (zero length).  For example, the "file" URI
   scheme is defined so that no authority, an empty host, and
   "localhost" all mean the end-user's machine, whereas the "http"
   scheme considers a missing authority or empty host invalid.

Next thing would be to figure out whether the bug is in our
URL class or elsewhere.

cheers,
  Roland

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


Re: http:///

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Thu, 2006-11-16 at 16:30 +0200, Eugeny N Dzhurinsky wrote:
> When trying to access link http:///, HttoClient tries to access local host
> instead of trowing some kind of exception for empty host name.
> 
> Is it bug or a feature?

It is likely to be a bug. We happily accept patches, by the way.

Oleg


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