cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Adding PROPFIND support

From: David Strauss <david_at_davidstrauss.net>
Date: Sun, 14 Apr 2013 20:35:04 -0700

On Sun, Apr 14, 2013 at 1:36 AM, Daniel Stenberg <daniel_at_haxx.se> wrote:
> The biggest difference for those protocols I believe, is that they A) have
> directory listing as part of their protocol concepts and B) don't need any
> extra 3rd party lib to handle the directory linstings. HTTP has no directory
> listings. PROPFIND is "just" webdav which is a protocol on top of HTTP.

There's a similar relationship between SSH and SFTP (not FTPS), where
the SFTP transport runs in a connection managed and authenticated
using SSH. WebDAV just shares more with HTTP than SFTP shares with
shell-style SSH. Admittedly, SSH alone wouldn't be very useful in
libcurl without SFTP.

I understand the concern with adding a library dependency, but it
could be a default-off compile-time option.

>> Is there interest in ls-style output for WebDAV, provided the path ends in
>> a slash and an option gets set?
>
> To me it feels like a layering violation, but I'm open for what others think
> and say.

I wasn't quite clear on how this would fit in, either, so I just threw
out an idea that seems compatible with how libcurl's FTP support works
for clients. That is, it would allows libcurl users to work with
WebDAV servers the same way they work with FTP servers. But, maybe I'm
thinking about the FTP code incorrectly in assuming it abstracts the
differences between how different FTP servers present their directory
listings. I did notice a comment about using a different FTP command
to get more consistent results from different servers.

My ideal would be a new, optional write callback supported for
directory listings in the various protocols (SFTP, FTP, etc.) that
would send file path and attribute information. It could function like
the header write callback, which provides the called function with a
more coherent unit of data rather than a buffer of incoming bytes.
From a layering perspective, though, this could all live in a new
library that provides libcurl-compatible write callbacks for directory
listings that abstract the differences between protocols.

--
David Strauss
   | david_at_davidstrauss.net
   | +1 512 577 5827 [mobile]
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2013-04-15