You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Loyal <lo...@bellosogno.com> on 2009/03/13 02:50:48 UTC

some advice re: custom WebDav (mod_dav)

Hi all,

I'm building a Web service that must accept small (1-50k) files pushed to it
via the WebDAV protocol. I would like the Web server's DAV service to
process the files immediately (stuffing the contents into a MySQL table). I
also want to prevent any users from reading any files present (return an
empty directory), while still allowing writing clients to read back what
they wrote for a short time, say, a few minutes from the same IP, so that
their DAV writes don't fail. I would like to check the filenames of the
incoming writes and reject any that don't match an active user's ID (my form
of auth). Otherwise, access to the drop directory would be completely open
(no auth). 

To accomplish all this, I thought I'd create a modified version of mod_dav
for Apache and run this non-standard config on a dedicated box. 

Anybody WebDAV experts out there with an opinion on my thinking here?  Am I
nuts to try this?


RE: some advice re: custom WebDav (mod_dav)

Posted by Loyal <lo...@bellosogno.com>.
Thanks, Nick. Appreciate the reply. I'll look more into it, but after
quickly scanning the mod_dav source code, looks like I have a big learning
curve ahead of me to understand where to insert my modifications. 

I have cobbled together a simple PHP script that does what I want. Do you
know of a way to have Apache redirect processing of http requests to an
external script for only files ending in a specific suffix?

- Loyal

-----Original Message-----
From: Nick Kew [mailto:nick@webthing.com] 
Sent: Friday, March 13, 2009 1:55 AM
To: dev@httpd.apache.org
Subject: Re: some advice re: custom WebDav (mod_dav)


On 13 Mar 2009, at 01:50, Loyal wrote:
>
> To accomplish all this, I thought I'd create a modified version of 
> mod_dav for Apache and run this non-standard config on a dedicated 
> box.

In principle that makes perfect sense.  What you need to do is (mostly) to
create a new fs provider for mod_dav, using mod_dbd to provide the backend.

In practice that's a lot more complex than it should be: support in mod_dav
for alternative providers is patchy.

Having BTDT (up to a point), if I were to revisit this task I'd want to
update the core mod_dav quite significantly, rather than always try to work
around its shortcomings (as I did at the time).

--
Nick Kew


Re: some advice re: custom WebDav (mod_dav)

Posted by Nick Kew <ni...@webthing.com>.
On 13 Mar 2009, at 01:50, Loyal wrote:
>
> To accomplish all this, I thought I'd create a modified version of  
> mod_dav
> for Apache and run this non-standard config on a dedicated box.

In principle that makes perfect sense.  What you need to do is (mostly)
to create a new fs provider for mod_dav, using mod_dbd to provide
the backend.

In practice that's a lot more complex than it should be: support in
mod_dav for alternative providers is patchy.

Having BTDT (up to a point), if I were to revisit this task I'd want
to update the core mod_dav quite significantly, rather than always
try to work around its shortcomings (as I did at the time).

-- 
Nick Kew