Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4503239

Resolve doesn't work correctly with URI when reference is just a fragment

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.4.0
    • core-libs
    • None
    • beta3
    • generic
    • generic
    • Verified

      With "http://a/b/c/d;p?q" as base, and resolve "#s" against it. In URI, it results in http://a/b/c/d;p#s.

      I believe that the intent of the URI resolution process in
      RFC2396 section 5.2.2 is clearly to leave the base URI unchanged and
      simply apply any fragment to the existing base URI a.k.a "current
      document". Doing this requires concatenation rather than following the
      RFC resolution algorithm with an illegal empty path.

      A URI with a query component is not considered equal to the
      same URI with the query component removed (query comparison is part of
      URI.equals()) so I don't see how we can strip away the query component
      when resolving "#f" against a base URI and then claim that the
      resulting URI retains the intended semantics of referring to the
      "current document".

            mr Mark Reinhold
            ywangsunw Yingxian Wang (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: