You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Ian Smith-Heisters <pu...@0x09.com> on 2005/12/09 22:20:23 UTC

[QUESTION]mp2: WebDAV & Apache output filter

Hi all,

I'm trying to write an Apache 2 output filter using mod_perl. I've 
gotten a couple basic filters setup by reading:

http://www.perl.com/lpt/a/2003/04/17/filters.html
and
http://perl.apache.org/docs/2.0/user/handlers/filters.html

My goal is to setup a simple filter that will prepend some text to GETs 
requested by a certain client (Macromedia Contribute 3.0), and then, 
since I'm doing this with WebDAV (dav_svn to be specific), remove the 
added text when Contribute PUTs the file back.

I've gotten the filter to prepend text when Firefox requests a document 
just fine. However, Contribute is having some problems since it's a 
WebDAV client, not a web browser. It complains that it can't contact the 
server (its errors are very unspecfic).

Removing my output filter from Apache allows Contribute back in. 
Comparing the response headers with and without the filter installed, 
the headers are identical. Tail-ing the Apache logs reveals this:

WITH FILTER INSTALLED: (unsuccesful)
==> /var/log/apache2/svn.access.log <==
10.1.5.239 - ismithhe [09/Dec/2005:15:31:28 -0500] "OPTIONS 
/website/trunk/community/ HTTP/1.1" 200 - "-" "Contribute/3.0"

WITHOUT FILTER INSTALLED: (succesful)
==> /var/log/apache2/svn.access.log <==
10.1.5.239 - ismithhe [09/Dec/2005:15:32:36 -0500] "OPTIONS 
/website/trunk/community/ HTTP/1.1" 200 - "-" "Contribute/3.0"
10.1.5.239 - ismithhe [09/Dec/2005:15:32:36 -0500] "PROPFIND 
/website/trunk/community/ HTTP/1.1" 207 346 "-" "Contribute/3.0"
10.1.5.239 - ismithhe [09/Dec/2005:15:32:36 -0500] "PROPFIND 
/website/trunk/community/ HTTP/1.1" 207 346 "-" "Contribute/3.0"
10.1.5.239 - ismithhe [09/Dec/2005:15:32:36 -0500] "PROPFIND 
/website/trunk/community/ HTTP/1.1" 207 2191 "-" "Contribute/3.0"
10.1.5.239 - ismithhe [09/Dec/2005:15:32:36 -0500] "PROPFIND 
/website/trunk/community/_NOTES HTTP/1.1" 404 413 "-" "Contribute/3.0"
... and so on...

I wouldn't think that my filter would get in the way of WebDAV, since 
it's only an output filter at this point. Does anyone have any 
suggestions for getting Apache i/o filters working in conjunction with 
WebDAV?

Thanks very much,
Ian