httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian J. France" <>
Subject DAV Resource Type Patch
Date Fri, 18 Sep 2009 14:01:27 GMT
Next up is the dav resource provider patch.

Currently there is no way to add additional resource type responses to  
mod_dav.  We are stuck with hard coded list from  

but with this patch:

other modules can become providers and add resource types to the  
response.  This is needed because mod_dav_acl needs to add principal,  
mod_caldav needs to add calendar and mod_carddav needs to add  
addressbook resource types.

This patch (which should *not* be committed) extends the previous  
example mod_dav_acl to add the principal resource type:

Once patched and installed you can test it by adding the following to  
extra/httpd-dav.conf in the uploads Directory block:

     AuthType Digest
     AuthName DAV-upload

     AuthUserFile "<path to>/user.passwd"
     AuthDigestProvider file

creating a user.passwd file like this:

   % htdigest -c "<path to>/user.passwd" DAV-upload admin

starting apache and then doing a request like this:

% curl -v --digest --data-binary @resourcetype.txt --user admin \
     -H "Content-type: text/xml; charset=\"utf-8\"" \
     -H "Depth: 0" \
     -X 'PROPFIND' \

where a file called resourcetype.txt is in the same directory with the  
following xml in it:

<?xml version="1.0" encoding="utf-8" ?>
<D:propfind xmlns:D="DAV:">

and you should see a response that looks like this:

<?xml version="1.0" encoding="utf-8"?>
<D:multistatus xmlns:D="DAV:" xmlns:ns0="DAV:">
<D:response xmlns:lp1="DAV:">
<D:status>HTTP/1.1 200 OK</D:status>

The patches are based on Jari's httpd-2.2.8-ju.patch patch.  I have  
changed dav_hooks_resource to dav_resource_type_provider, based on  
previous comments on the options patch and also remove the ctx as it  
was not being used.

Comments, questions, problems?


View raw message