Module mod_dav

Module mod_dav supports directives for the IBM® HTTP Server for i Web server.

Summary

This module provides class 1 and class 2 WebDAV (Web-based Distributed Authoring and Versioning) functionality for HTTP Server. This extension to the HTTP protocol allows creating, moving, copying, and deleting resources and collections on a remote web server.

In order for WebDAV to function, you have to have your LoadModules, Dav provider, and either DavLockDB or DavQsysLockDB (depending on your provider) in your configuration file. If any of these elements are missing, your server will not start.

To use DAV at all, your configuration file must include:

LoadModule dav_module /QSYS.LIB/QHTTPSVR.LIB/QZSRDAV.SRVPGM

To use DAV for root, QOpenSys, or other UNIX-like filesystems, in addition to the above, your configuration file must include:

LoadModule dav_fs_module /QSYS.LIB/QHTTPSVR.LIB/QZSRDAVF.SRVPGM

To use DAV in QSYS, your configuration file must include:

LoadModule dav_qsys_module /QSYS.LIB/QHTTPSVR.LIB/QZSRDAVQS.SRVPGM
Note: You'll need two LoadModules to use DAV. If you want to DAV-enable both IFS and QSYS, you'll need three LoadModules.

Directives

Dav

Module: mod_dav
Syntax: Dav on | off | [provider name]
Default: Dav off
Context: directory
Override: none
Origin: Apache
Usage Considerations: A LoadModule is required in the configuration file prior to using the directive. The statement should be as follows: LoadModule dav_module /QSYS.LIB/QHTTPSVR.LIB/QZSRDAV.SRVPGM
Example: Dav on

The Dav directive enables the WebDAV HTTP methods for the given container. You may want to add a <Limit> clause inside the location directive to limit access to Dav-enabled locations.

Parameter: on | off | [provider name]
  • When on is specified, WebDAV HTTP methods are enabled for the given container, using the default provider "filesystem".
  • When off is specified, WebDAV HTTP methods are disabled for the given container.
  • The optional provider name parameter is used to specify the Dav provider for a directory or location. There are no Server restrictions on the number or types of characters in the provider name. The provider name used on the Dav directive is case sensitive.

The values on and off are not case sensitive.

Example 1:

DavLockDB /tmp/DavLock
LoadModule dav_module /qsys.lib/qhttpsvr.lib/qzsrdav.srvpgm 
LoadModule dav_fs_module /qsys.lib/qhttpsvr.lib/qzsrdavf.srvpgm 
<Location /foo>
   Dav on
</Location>

Example 2:

DavQsysLockDB mylib/DavLock
LoadModule dav_module /qsys.lib/qhttpsvr.lib/qzsrdav.srvpgm 
LoadModule dav_qsys_module /qsys.lib/qhttpsvr.lib/qzsrdavqs.srvpgm 

<Directory /qsys.lib/webserver.lib*>
   Dav qsys
</Directory>

If you specify "Dav on" in a directory, you will get the default provider "filesystem".

The Dav directive does not override like other directory-scoped directives. You cannot turn Dav on in one directory, and then turn it off in a sub-directory. You also cannot change providers in a sub-directory. You will receive runtime errors if this happens. The following examples are invalid and will cause the HTTP Server to generate a runtime error:

<Directory />
   AllowOverride None
   Order Deny,Allow
   Deny From all
   Dav filesystem
   </Files>
      Dav off
   </Files>
</Directory>

Another invalid example:

<Directory /www/parentDirectory>
   Dav filesystem
<Directory>
<Directory /www/parentDirectory/childDirectory>
   Dav off
</Directory>
Note: If you want to Dav-enable file systems other than root or QOpenSys, you will have to specify your provider's name on the directive to get the desired behavior. As the server is shipped, the only valid provider names are "filesystem" and "qsys". Filesystem supports root, QOpenSys (and other UNIX-like file systems); qsys supports QSYS objects.

DavDepthInfinity

Module: mod_dav
Syntax: DavDepthInfinity on | off
Default: DavDepthInfinity off
Context: server config, virtual host, directory
Override: none
Origin: Apache
Usage Considerations: A LoadModule is required in the configuration file prior to using the directive. The statement should be as follows: LoadModule dav_module /QSYS.LIB/QHTTPSVR.LIB/QZSRDAV.SRVPGM
Example: DavDepthInfinity on

The DavDepthInfinity directive allows the processing of PROPFIND requests containing the header 'Depth: Infinity'. Because this type of request could constitute a denial-of-service attack, by default it is not allowed.

Parameter: on | off
  • When on is specified, processing of PROPFIND requests containing the header 'Depth: Infinity' is allowed.
  • When off is specified, processing of PROPFIND requests containing the header 'Depth: Infinity' is not allowed.

DavLockDB

Module: mod_dav
Syntax: DavLockDB filename
Default: none
Context: server config, virtual host
Override: none
Origin: Apache
Usage Considerations: A LoadModule is required in the configuration file prior to using the directive. The statement should be as follows: LoadModule dav_fs_module /QSYS.LIB/QHTTPSVR.LIB/QZSRDAVF.SRVPGM
Example: DavLockDB /tmp/DavLock

The DavLockDB directive specifies the full path to the lock database, excluding an extension. The default (file system) implementation of mod_dav uses a SDBM database to track user locks.

Parameter: filename
  • The filename parameter specifies the full path to the lock database, excluding an extension.

This directive is required if you are using Dav with the default (filesystem) provider. For example,

DavLockDB /tmp/DavLock

DavMinTimeout

Module: mod_dav
Syntax: DavMinTimeout seconds
Default: DavMinTimeout 0
Context: server config, virtual host, directory
Override: none
Origin: Apache
Usage Considerations: A LoadModule is required in the configuration file prior to using the directive. The statement should be as follows: LoadModule dav_module /QSYS.LIB/QHTTPSVR.LIB/QZSRDAV.SRVPGM
Example: DavMinTimeout 600

The DavMinTimeout directive specifies, in seconds, the minimum lock timeout to return to a client. Microsoft Web Folders defaults to a timeout of 120 seconds; the DavMinTimeout can override this to a higher value (like 600 seconds) to reduce the chance of the client losing the lock due to network latency.

When a client requests a DAV resource lock, it can also specify a time when the lock will be automatically removed by the server. This value is only a request, and the server can ignore it or inform the client of an arbitrary value. The maximum value for minutes is 166; the maximum value for seconds is 9999.

Parameter: seconds
  • The seconds parameter is any integer value from 0 to 9999.

DavQsysLockDB

Module: mod_dav
Syntax: DAVQsysLockDB library/filename
Default: none
Context: server config, virtual host
Override: none
Origin: Modified
Usage Considerations: A LoadModule is required in the configuration file prior to using the directive. The statement should be as follows: LoadModule dav_qsys_module /QSYS.LIB/QHTTPSVR.LIB/QZSRDAVQS.SRVPGM
Example: DAVQsysLockDB mylib/LockDB

The DAVQsysLockDB directive specifies the library qualified database file that the QSYS repository manager uses to track user locks of QSYS resources. The library must exist. The names of the library and file must follow the QSYS file system naming rules.

Parameter: library/filename
  • The library/filename parameter specifies the library qualified database file that the QSYS repository manager uses to track user locks of QSYS resources.