Menu

#195 WebDAV client

open
5
2005-02-17
2005-02-04
No

There's a new implementation of a WebDAV client, which I hereby
would like to offer for consideration to be included in Tcllib.

The README is at:
http://www.equi4.com/pub/sk/davkit.kit/lib/webdav/README
There is a starkit at:
http://www.equi4.com/pub/sk/davkit.kit
(it's also in sdarchive)

The code consists of two packages:

- webdav is a client which supports a number of functions,
as described here:
http://www.equi4.com/pub/sk/davkit.kit/lib/webdav/
webdav.html

- davvfs is a VFS driver which uses the webdav package

Webdav requires tclxml to parse the XML returned by WebDAV
server (the trivial XML that is sent is done in plain Tcl). The client
becomes considerably faster when a compiled version of expat is
present, but TclXML will fall back to pure Tcl just fine on any
platform.

Davvfs is a driver which supercedes the webdavvfs client in TclVFS.
That client was a proof of concept, and only supports read-only use
of webdav, while these to packages support r/w, globs, stats, mkdir,
rmdir, etc.

The current code does not support locking or versioning. It also is
relatively simple right now, because a read is done entirely on open
and a write on close. A refinement would be to pass channels
around so I/O can be done more gradually, and progress statusbars
could be supported.

This code was written for a commercial project, and not taken
further than its current (startup) requirements. It has been used
with Apache as WebDAV server, and has been used quite a bit
already. The code can be placed under a Tcl- or MIT-license.

There are test suites, but these are a bit cumbersome because they
depend on a hardwired server with specific content (test content is
included in the starkit).

I think this set of packages would be a useful addition to tcllib, but
a few issues will need to be resolved to do this:
- is it ok to depend on a pure-tcl non-tcllib package? (TclXML)
- if not, are there alternatives? the parsing demands are not high
- should davvfs go here on in TclVFS?
W.r.t. that last point, I think it would be better to include VFS
drivers here. TclVFS will probably at some point become part of the
core, or tightly bundled with it - not all possible drivers would be
included I suspect (to allow them to be developed further, and
because not everyone needs them all).

I'm ok with whatever the tcllib maintainers decide. Just wanted to
try and find a good home for this code...

-jcw

Discussion

  • Anonymous

    Anonymous - 2005-02-04

    Logged In: YES
    user_id=1983

    Forgot to mention that the webdav package relies on a modified httpd
    package (mods by Vinde Darley and Pat Thoyts AFAICT, included in the
    starkit) to support DAV requests. There is incomplete support for HTTP/
    1.1 in there, which would probably speed up the case of lots of back-to-
    back requests.

     
  • Pat Thoyts

    Pat Thoyts - 2005-02-17
    • assigned_to: nobody --> patthoyts
     
  • Kevin B KENNY

    Kevin B KENNY - 2011-09-29

    From the Tcl'ers Chat today (times UTC-0400):

    [13:18] <siyb> is jcw available by any chance?
    [13:19] kbk He isn't often in the room, but he answers email. Can someone else help?
    ...
    [13:19] <siyb> kbk: it's about his davkit implementation. i was looking for a source version if one is available
    [13:21] <siyb> kbk: do you know if his email is still up to date (jcw@equi4.com)
    [13:22] * kbk would have to check contact information at http://jeelabs.org/ - but hold on...
    [13:23] kbk davkit is available as a starkit at http://tcl.tk/starkits/
    [13:23] kbk I just did an 'sdx unwrap'...
    [13:24] kbk and I found a bunch of Tcl code, and then...
    [13:24] kbk ... native code in the Tclxml and Tclexpat packages...
    [13:24] kbk ... both of which are readily available in source form.
    [13:24] kbk So it looks as if downloading and unwrapping the starkit gives you all the pieces.
    [13:24] <siyb> thanks
    ...
    [13:34] aku We should possibly still ask jcw if he would be willing to put the sources up on github
    [13:36] kbk Maybe... didn't the 'webdav' package get added to Tcllib at some point? That's really all that the kit is: webdav + dependencies (base64, Tclexpat, Tclxml, and uri)
    [13:37] aku Hm. Let me check ...
    [13:38] aku No, no webdav in tcllib
    [13:58] kbk http://wiki.tcl.tk/13480 says, "The webdav and davvfs packages have been submitted to Tcllib for consideration, review, and possible inclusion."
    [13:58] kbk so it's obvious what Jean-Claude's intention was.
    [13:58] aku Hm.
    [13:59] aku I don't remember that. I'll have a look through the bug database ...
    [13:59] kbk Suspicion: does the XML stuff (expat+tclxml) always require native code, and if so, did that cause a rejection?
    [14:00] aku IMHO should not. (Even if would prefer tDOM)
    [14:01] aku found it, assigned to Pat - 1115865
    [14:06] kbk siyb - Looks as if we dropped the ball about 6.5 years ago, but we're picking it up again. Better late than never.