RFR: JDK-8022748 (new URI(u.toString()).equals(u), does not hold with paths containing colons
Sebastian Sickelmann
sebastian.sickelmann at gmx.de
Fri Oct 16 13:14:46 UTC 2015
Hi,
is there someone who wants to sponsor/review my suggested change?
-- Sebastian
On 10/06/2015 01:13 PM, Sebastian Sickelmann wrote:
> Hi,
>
> i investigated the problem described in JDK-8022748[1] i found that
> the parser needed to be rescued for confusion while handling relative URIs.
>
> A URI created through the relativize-method is schemaless and so it
> need to handle the special-case (a colon in the path-element). While
> there is also another way to handle it (encode the colon as %3A) i think
> we should not choose to encode everything. First it would introduce another
> style of special-case handling of a colon in the path (see the method
> maybeAddLeadingDot which is used while normalizing) and when resolving
> it back we would need to decode it back or leave it the encoded way which
> is not suggest by RFC2396 section "1.5 URI Transcribability".
>
> Also in Section 5 of RFC2396 it is suggested to rescue a colon in the
> path-element in a relative URI through prepending a "./" just like in
> maybeAddLeadingDot.
>
> I am not sure if it is worth to refactor the split(),join(),normalize()
> methods to provide a reusable colon-detection and -handling.
>
> So, please find my webrev with a simpler solution at:
>
> http://cr.openjdk.java.net/~sebastian/8022748/webrev.00/
>
> -- Sebastian
> [1] https://bugs.openjdk.java.net/browse/JDK-8022748
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/net-dev/attachments/20151016/5cd422f5/attachment.html>
More information about the net-dev
mailing list