Parsing too strict in java.net.URI? (David Lloyd)

Peter Firmstone peter.firmstone at zeus.net.au
Sat Dec 2 22:44:13 UTC 2017


> Have there been any recent developments, updates, or insights on this
> issue?  I wonder if a gradual change to RFC 3986 support might be more
> appropriate: for example, start with*just*  accepting empty SSP.
>
> If the compatibility requirements of java.net.URI are too stringent to
> allow for any change, then surely all that can be done is to deprecate
> &  replace it, which would need no further delay that I can see.

A strict RFC 3896 implementation, modified from Apache Harmony's 
java.net.URI to support RFC3986.   This is also in Apache River, the 
code has provenance, if the other authors are still contactable, you 
might get it donated as GPL.

It doesn't implement Serializable, it does have method signatures 
identical to java.net.URI, so it's a drop in replacement in most cases.  
It has some additional methods, to fix illegal but commonly used URI 
forms.  You could use it to test the impact of migrating to RFC3986, 
without having to implement it yourselves.

https://github.com/pfirmstone/JGDMS/tree/trunk/JGDMS/jgdms-platform/src/main/java/org/apache/river/api/net

Regards,

Peter.


More information about the net-dev mailing list