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

Parser2.resolveURI wrong about relative URIs

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 1.2.0
    • 1.4.1
    • xml
    • 1.2.0
    • x86
    • linux
    • Not verified

    Description

      Name: gm110360 Date: 04/16/2002


      FULL PRODUCT VERSION :
      java version "1.4.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
      Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)


      FULL OPERATING SYSTEM VERSION :
      glibc-2.1.3-22.1
      kernel 2.2.20
      Red Hat Linux release 6.2 (Piglet)
      VA Linux Release 6.2.4 02/21/01


      A DESCRIPTION OF THE PROBLEM :
      I am using URIs that look like this:

          tag:quiq.com,2002:enumeration.dtd

      This is a perfectly good URI, and it's absolute. However,
      the Crimson parser thinks that it is a relative URI, and
      prepends the current path to it as if it was a file name.

      The offending method is resolveURI(String uri), line 2741 of
      org/apache/crimson/parser/Parser2.java in the standard 1.4
      distribution for Linux. The if statement on line 2753 fails in
      the case where there is a colon but no slash: it treats this
      as if the slash preceded the colon. But a colon and no
      slash means the same thing as a colon preceding a slash:
      it is an absolute URI.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Read the code I outlined.
      2. Think.
      3. Go look at the URI spec: http://www.ietf.org/rfc/rfc2396.txt

      This bug can be reproduced always.

      CUSTOMER WORKAROUND :
      Use Xerces instead of Crimson.
      (Review ID: 144976)
      ======================================================================
      ###@###.### 11/2/04 22:00 GMT

      Attachments

        Activity

          People

            jsuttorsunw Jeff Suttor (Inactive)
            gmanwanisunw Girish Manwani (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: