Subject: | Root href is double slash ("//") |
Date: | Sat, 21 Aug 2010 23:05:36 -0700 |
To: | bug-Net-DAV-Server [...] rt.cpan.org |
From: | Patrick Mahoney <pat [...] polycrystal.org> |
I don't know if this violates the DAV spec or not, but doing
PROPFIND / returns xml with an href of "//". This double
slash trips up gvfs dav backend (see
https://bugzilla.gnome.org/show_bug.cgi?id=627626).
The problem is in Net/DAV/Server.pm around line 450. The
code appends a '/' to any path that is a directory without
checking if it already ends in a '/'.
=====================
The HTTP request by gvfsd-dav is this:
PROPFIND / HTTP/1.0
...
<?xml version="1.0" encoding="utf-8" ?>
<D:propfind xmlns:D="DAV:">
<D:prop>
<D:resourcetype/>
</D:prop>
</D:propfind>
The response from Net::DAV::Server is this (note href="//")
<?xml version="1.0" encoding="utf-8"?>
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href>//</D:href>
<D:propstat>
<D:prop>
<D:resourcetype>
<D:collection/>
</D:resourcetype>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
</D:multistatus>
--
Patrick Mahoney <pat@polycrystal.org>