Subject: | ALLPROP bug |
Date: | Thu, 21 Oct 2010 12:45:59 -0400 |
To: | bug-HTTP-DAV [...] rt.cpan.org |
From: | James Mcininch <James.Mcininch [...] biogenidec.com> |
The HTTP::DAV module has an issue in that it's completely reliant on the
return value of PROFIND allprop. The problem stems from the fact that many
DAV servers don't implement allprop properly, if at all. For example, many
IIS servers will simply return the href and no properties. HTTP::DAV
interprets this as the object not being a collection and you can't open
it.
Instead, HTTP::DAV should fall-back to explicitly requesting certain
properties, such as resource type, content length, etc. After a little
playing around with Wireshark and other DAV libraries and clients, this
appears to be the mechanism used by Apple, Microsoft, and various Linux
clients.
Better logic: get OPTIONS and make sure there's PROPFIND. Then, do a
PROPFIND to request getlastmodified and resourcetype. Check if resource
type is a collection; if so, open succeeds!