Hi,

>I had this in the new
>URL(http://4526353&[EMAIL PROTECTED]@##$#$$%(()))*(*&&^%^%^)
and
>it passed.  I was expecting to get some error.  Should I?

No, you shouldn't get an error.  It's a valid but nonsensical URL.  If
you're not clear why this is valid, and are interested, look at RFC
2396.  To summarize: everything after the host in an http URL is
optional.  You have a host name 4526353&*************^%$ (to see why the
junk after starting with # is not parsed as part of the host name, refer
to the above RFC, especially the section on encoding escaped sequences).

You can easily confirm java's behavior is consistent with Internet
Explorer and other browsers, by comparing the output from
System.out.println(new URL(the URL above).getHost()) and what happens
when you try to navigate to the above URL in Internet Explore; same
processing, same host name (which if it existed would actually be served
just fine).

In the future, please do a bit more research before making such a bold
claim as the java.net.URL implementation being broken with regard to
HTTP URLs ;)  It had me, for one, worried, and I'm not even a Sun person
;)

Yoav




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to