cURL / Mailing Lists / curl-users / Single Mail

curl-users

webdav: list directory content?

From: <Michael.Renner_at_dab.com>
Date: Wed, 1 Feb 2006 09:34:29 +0100

Moin,
I used to use curl to up- and download files with known filenames from a webdav server. This was done by using the switches '--remote-name' and '--upload-file'.
But now, I have to list the remote directory to see the files that I have to get. But while I can list the directory content using konquerer, I get 301 or 404 errors by trying this with curl:
renner@dab:~$ curl -u myname:geheim http://myserver.com:/rennmi/tmp/
errors/404.html

renner@dab:~$ curl -u myname:geheim http://myserver.com:/rennmi/tmp
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved here.</p>
</body></html>

Strange, but I can download files from this directory

renner@dab:~$ curl --remote-name -u myname:geheim http://myserver.com:/rennmi/tmp/daten.bin
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1024k 100 1024k 0 0 487k 0 0:00:02 0:00:02 --:--:-- 489k

I tried the '-L' option for following 301's, but I got a 404 with this. I tried to set the user agent to something that is configured as 'redirect-carefully' but without success.

Dosn't support curl the PROPFIND command?

Michael Renner
DAB Bank AG
IT System Infrastructure
Landsberger Strasse 428
81241 München
Telefon: +49 (0) 89 50068-580
Mobile: +49 (0) 89 21705279
Received on 2006-02-01