The trace on this is:

The difference between e.g. Nautilus and HTTP::DAV is that the former sends a <D:propfind xmlns:D="DAV:"><D:prop>... request, while the latter sends a <D:propfind xmlns:D="DAV:"><D:allprop/>... request, which hits the above branch of code. There, the propfind method attempts to use the HTTP Basic Auth user credentials, which it doesn't have because AFAICT it never requests them from the client (Update: and at the moment I don't see a way to force the client to send the auth, although I may be missing something).

Unfortunately, that's where my analysis ends for now - I don't know much about WebDAV and I'm not sure which module is at fault here, although I suspect it's Net::DAV::Server not handling this type of request, because the HTTP::DAV client code seems to work fine for me on two different servers. So you might just want to use a different server for testing, and perhaps file a bug for Net::DAV::Server (although that module hasn't been updated since 2013).

I like to sometimes use lighttpd for quick & dirty test servers. On Ubuntu, sudo apt-get install --no-install-recommends lighttpd lighttpd-mod-webdav, sudo systemctl stop lighttpd, and sudo systemctl disable lighttpd (assuming you don't want it running all the time), then create a file /tmp/lhttpd.conf with the following contents (module docs):

server.document-root = "/tmp/foo/" server.port = 4242 server.bind = "127.0.0.1" server.modules += ( "mod_webdav" ) $HTTP["url"] =~ "^/dav($|/)" { webdav.activate = "enable" #webdav.is-readonly = "disable" # (default) webdav.sqlite-db-name = "/tmp/foo_webdav.db" }

Then run mkdir -p /tmp/foo/dav and lighttpd -Df /tmp/lhttpd.conf, and you can then access the server using HTTP::DAV at http://localhost:4242/dav/.

There are lots of other modules available, see the files (including the README) that get installed at /etc/lighttpd/conf-available, it includes SSL, authentication, CGI, and FastCGI.


In reply to Re: Problems learning WebDAV with dav_this and HTTP::DAV by haukex
in thread Problems learning WebDAV with dav_this and HTTP::DAV by skleblan

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.