[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug classpath/24249] New: XMLParser resolves wrong URL to DTDs in certa
From: |
thebohemian at gmx dot net |
Subject: |
[Bug classpath/24249] New: XMLParser resolves wrong URL to DTDs in certain situations |
Date: |
7 Oct 2005 01:26:44 -0000 |
Provided that an XML document is parsed with an InputSource whose systemId is
set to something like: file:////foo/baz (note the one superfluous /). The XML
Parser is not able to find a corresponding DTD if it is addressed relatively,
eg. <!DOCTYPE someDoc SYSTEM "someDoc.dtd">.
The reason is a flaw in the design of the URL class (which is correctly
implemented) and some code in the gnu/xml/dom/ls/DomLSParser which exploits
this flaw.
It works as follows:
If you have a String s = "file:////foo/baz" and make an URL from it like this:
u = new URL(s);
It's toString() method will return:
file://foo/baz
If you now create another URL object from this String. It will interpreter foo
as a hostname although this was not the case in the original String (and URL).
--
Summary: XMLParser resolves wrong URL to DTDs in certain
situations
Product: classpath
Version: 0.18
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: classpath
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: thebohemian at gmx dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24249
- [Bug classpath/24249] New: XMLParser resolves wrong URL to DTDs in certain situations,
thebohemian at gmx dot net <=