I'm wondering if anybody else has encountered this problem...
I've got a funky URL: "http://-angelcries.blogspot.com/"
Note the leading '-' in the subdomain.
This works fine in Firefox, and gives no problem with the URL class.
But the URI class throws a URISyntaxException if you use a host name
with a leading '-'.
I've read through the relevant portions of RFCs 3986, 2396, 1123, 1034
and 952. The general trend has been for more lenient domain name
specification over time, but even today subdomains and domains should
not start with '-'. However it's clear that DNS servers allow the use
of a leading dash for subdomains.
Since HttpClient is often used to fetch content that is browsed by
users, it would be an admirable goal to work around this problem - but
the only solution I see is to use a custom URI class instead of what's
in the JDK.
Based on what I see in other projects (e.g. Tomcat) this process of
replacing default implementations with custom versions winds up being
a path that's often taken, unfortunately, due to issues like this one.
-- 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]