Skip Menu |

This queue is for tickets about the Net-DAV-Server CPAN distribution.

Report information
The Basics
Id: 60606
Status: resolved
Worked: 5 min
Priority: 0/
Queue: Net-DAV-Server

People
Owner: cpan.wade [...] anomaly.org
Requestors: pat [...] polycrystal.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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>
On Sun Aug 22 02:05:52 2010, pat@polycrystal.org wrote: Show quoted text
> 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 '/'.
Thanks for reporting this. I've checked the code and verified that this is actually properly handled in the 1.300_05 dev version. I've also updated the unit test for propfind to verify that the href tag for the root directory returns '/' not '//'. Thanks again for the report.
Resolved before version 1.300_05.