Re: Relieving some ClassLoader contention in PreferredClassProvider
Mark Brouwer <[email protected]>
| Newsgroups | gmane.comp.java.sun.jini |
|---|---|
| Message-ID | <[email protected]> |
Bob Scheifler wrote:
>> So or I must be overlooking something, but to me it seems
>> http://foo[]bar.jar is no valid URL as foo[]bar.jar is no valid host
>> name.
>
> I didn't actually mean to give you that one,
> http://thoth/foo[]bar.jar
> will also fail.
Also according to RFC 1738 the hpath of foo[]bar.jar is invalid for:
hpath = hsegment *[ "/" hsegment ]
hsegment = *[ uchar | ";" | ":" | "@" | "&" | "=" ]
uchar = unreserved | escape
unreserved = alpha | digit | safe | extra
alpha and digit as usual,
safe = "$" | "-" | "_" | "." | "+"
extra = "!" | "*" | "'" | "(" | ")" | ","
So to me this URL seems invalid again. I just tried to submit it against
my Apache server and guess what my HTTP client (Firefox) first escaped
hpath to /foo%5B%5Dbar.jar and indeed that one works.
Issuing /foo[]bar.jar through a telnet session against Apache however
resulted in "501 Method Not Implemented", so Apache refuses to serve it,
so no practical use for this 'URL'.
So up till now you showed me the java.net.URL implementation is very bad
at following the standards, the URLs that won't throw a
MalformedURLException can't be delivered over the Internet because the
number one server refuses so, my embedded JAR file server refuses so
too, but don't know about the one of the JTSK.
So I must conclude that up till now you haven't really proofed (for me)
there would be harm in the conversion I had in mind.
>> My approach to URISyntaxException was to convert it to a
>> MalformedURLException, but I guess you already suspected that?
>
> Of course. Both a spec change and a wart.
This thread learnt me a few new English words for which I'm always
grateful, but to me the only wart here is the implementation of URL :-(.
--
Mark
--------------------------------------------------------------------------
Getting Started: http://www.jini.org/wiki/Category:Getting_Started
Community Web Site: http://jini.org
jini-users Archive: http://archives.java.sun.com/archives/jini-users.html
Unsubscribing: email "signoff JINI-USERS" to [email protected]