Re: [xml] Bug in "file" protocol



On Sat, Aug 24, 2002 at 11:41:21PM +0200, Daniel Gehriger wrote:
Hello,

I believe I found a buglet in xmlIO.c (line 295) : if the "file"
protocol contains the host specification "localhost", a leading forward
slash is always included in the path name. This is a problem if the path
contains a Windows drive letter. That is, the URL

      file://localhost/C:/TEMP/foo.xml 

results in a path name of

      /C:/TEMP/foo.xml

  Which is actually what RFC 2396 and the RFC it inherits file:// definition
from define, the last time I checked :-)

The code that handles "file:///" correctly handles Windows-style paths.

  Okay I added the specific #ifdef for Windows ... But the real error
IMHO is to believe file://localhost/C:/TEMP/foo.xml should be equivalent
from "C:/TEMP/foo.xml", oh well ...

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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