I'm trying to learn how to use WebDAV with Perl. My main use-case is simply downloading several files and folders (I think the term is collections in DAV??). I'm using App::DAVThis to stand up a simple test server, and I'm trying to learn how to use HTTP::DAV but I'm having some issues getting it to work. I was hoping that after I got it working with dav_this (the name of the executable script), then I can move on to a production server that supports https.

I keep getting errors regarding Bad Requests. Does anyone know if I'm using the module correctly? The frustrating thing is that I can use cadaver to connect to the temp server and it works just fine.

Test Code

#!/usr/bin/env perl use strict; use warnings; use utf8; use HTTP::DAV; my $url = "http://localhost:4242/"; my $dav = HTTP::DAV->new; $dav->open(-url=>$url) or die $dav->message; $dav->get(-url=>"/", -to=>".");

Error message

Server response: Could not access http://localhost:4242/: Bad Request +at davtest.pl line 14.

In reply to 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.