Project

General

Profile

Mod webdav » History » Revision 21

Revision 20 (gstrauss, 2019-05-27 20:05) → Revision 21/35 (gstrauss, 2019-05-27 20:07)

h1. WebDAV 


 *Module: mod_webdav* 

 {{>toc}} 

 h2. Description 

 The WebDAV module is an implementation of RFC 4918.    (since 1.4.54) 

 Supported methods: 

 * PROPFIND 
 * PROPPATCH 
 * OPTIONS 
 * MKCOL 
 * COPY 
 * MOVE 
 * DELETE 
 * PUT 
 * LOCK 
 * UNLOCK 

 and the usual GET, POST, HEAD from HTTP/1.1.  

 Mounting an open-access WebDAV resource into Windows XP (Network Places), Mac OS X (Finder) and Linux (Konqueror) works.    Mounting an authenticated WebDAV resource works in Mac OS X and Linux.    All @litmus@ tests pass since lighttpd 1.5.54. 



 h2. Options 

 webdav.activate 
   If you load the webdav module, the WebDAV functionality has to be enabled for the directories you want to provide to the user. 
  
   Default: disable 

 webdav.is-readonly 
   Only allow reading methods (GET, PROPFIND, OPTIONS) on WebDAV resources. 

   Default: writable 

 webdav.sqlite-db-name 
   The full path to the file you would like to use as your db file.    This is required for webdav props and locks. 

   Default: (empty) 

 webdav.opts    (since 1.4.54) 
   List of additional options to configure mod_webdav.    Versions of mod_webdav earlier than 1.4.54 were not RFC compliant and permitted partial PUT, which is unsafe.    In lighttpd 1.4.54, this is disabled by default, and    the unsafe behavior can be enabled with the following option, provided for backwards compatibilty. 

   @webdav.opts = ( "deprecated-unsafe-partial-put" => "enable" )@ 

   Default: (empty) 




 h2. Examples 

 To enable WebDAV for the /dav directory, you wrap your webdav options in a conditional. You have to use the regex like below as you want to match the directory /dav and everything below it, but not e.g. /davos. 

 <pre> 
   $HTTP["url"] =~ "^/dav($|/)" { 
     webdav.activate = "enable" 
     webdav.is-readonly = "enable" 
     webdav.sqlite-db-name = "/var/db/lighttpd/webdav.db" 
   } 
 </pre> 

 If you would like LOCK support: 

 <pre> 
   $HTTP["url"] =~ "^/dav($|/)" { 
     webdav.activate = "enable" 
     #webdav.is-readonly = "disable" # (default) 
     webdav.sqlite-db-name = "/var/db/lighttpd/webdav.db" 
   } 
 </pre> 



 h2. litmus tests 

 We use http://webdav.org/neon/litmus/ (version 0.13) to verify that we support the WebDAV spec.    (#1818) 

 Aside: the only @litmus@ test which does not pass has to do with XML validation, which libxml2 warns about but does not report as an error. 


 h2. Limitations 

 (incomplete list) 

 * incomplete "shared" lock support 

 h2. Installation 

 h3. PUT, DELETE, COPY, MOVE, MKCOL 

 mod_webdav is part of the 1.4.x distribution and supports GET, HEAD, OPTIONS, PUT, DELETE, COPY, MOVE, MKCOL without any additional libraries. 

 h3. PROPFIND, PROPPATCH 

 PROPFIND and PROPPATCH are used to do a directory-listing and to attach properties to a file-object.    This involves parsing XML-data and storing the properties.    To compile mod_webdav with property-support libxml2, libxml2-devel, sqlite, sqlite-devel packages are required and you have to build with: 

   @$ configure --with-webdav-props@ 

 h3. LOCK, UNLOCK 
 
 LOCK and UNLOCK are necessary to get mounting of file-systems working. This involves generate unique lock-tokens. We use libuuid for this job from packages e2fsprogs, e2fsprogs-devel.    LOCK with includes parsing XML again, so have to provide the dependencies of the previous section and libuuid: 

   @$ ./configure --with-webdav-props --with-webdav-locks@