hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 33437] - URI.getHost() generates IllegalArgumentException
Date Tue, 08 Feb 2005 07:36:23 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33437>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33437





------- Additional Comments From rolweber@de.ibm.com  2005-02-08 08:36 -------
Hello Bisser,

the getHost() method returns the host of URLs that follow the scheme
protocol://host/path, which is not the case for the mailto: URL.
I wouldn't say that you're doing something wrong, but I wouldn't call
it a bug either. EMail addresses are usually not decomposed on the
URI level, they are used opaque. The Javadocs of JDK 1.4's URI class
even mention this explicitly:

> An opaque URI is an absolute URI whose scheme-specific part does not
> begin with a slash character ('/'). Opaque URIs are not subject to
> further parsing. Some examples of opaque URIs are:
>
>    mailto:java-net@java.sun.com	
>    news:comp.lang.java	
>    urn:isbn:096139210x

Maybe we should update the JavaDocs of our URI class accordingly to
prevent other users from falling into the same trap.

cheers,
  Roland

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message