classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] [RFC] XML - fix for XMLParser's URL problem


From: Robert Schuster
Subject: Re: [cp-patches] [RFC] XML - fix for XMLParser's URL problem
Date: Sun, 09 Oct 2005 13:54:31 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.12) Gecko/20051005

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi.

> Is there anything in the W3C 'file' URI Scheme Update Project that could
> help us decide how to correctly parse "broken" file URLs?
> http://offset.skew.org/wiki/URI/File_scheme
Not directly but in http://www.faqs.org/rfcs/rfc1738.html in the section where
the file URL is described one could interpret that the URL path simply has to be
understood by the host where the file lies. That means if the underlying
filesystem can address the file /etc/paper.config with //etc/paper.config and
////etc//////paper.config because a "//" is treated like "/./" then the
following file URLs are legal, too:

file:///etc/paper.config
file:////etc/paper.config
file://////etc//////paper.config

Furthermore in the general description of the URL syntax I found this sentence:

"Note that the "/" between the host (or port) and the url-path is
NOT part of the url-path."

(The general syntax is //<user>:<password>@<host>:<port>/<url-path>).

This would mean that the URL I am having problem with
(file:////home/rob/tomcat/foo.xml) is perfectly valid as its components are:

"file://" + "" + "/" + "/home/rob/tomcat/foo.xml"
  |         |     |     |
  |         |     |     | URL path
  |         |     |
  |         |     |separator
  |         |
  |         host
  |
  protocol

This also means that Sun's implemenation eats valid URLs for breakfast and makes
them wrong (as does classpath atm).

I'll fix that.

cu
Robert
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFDSQT3G9cfwmwwEtoRAiE5AJ9Vy/6QUgIfLOqfFrVHCOmUH+TOTgCfX8z9
2SL/kd6jAMoJO2x4TNgwNsg=
=7N+5
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]