You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by vancaho <va...@gmail.com> on 2014/01/13 09:29:05 UTC

How to run the BIND and UPDATE functions in mod_dav.so module of Apache HTTPD server?

Hi everyone,
    I'm learning WebDAV protocol with apache httpd server and subversion.
    Atfer reading the source code of Mod_Dav.so(which is responsible for
interpreting the WebDAV protocol), I find that there are methods
dav_method_bind(
http://www.webdav.org/bind/draft-ietf-webdav-bind-27.html#rfc.section.4.1)
and dav_method_update(http://www.webdav.org/specs/rfc3253.html#METHOD_UPDATE)
which are used to process the "BIND" and "UPDATE" methods.

    However I find that the subversion and tortoiseSVN do not support
"BIND" or "UPDATE" methods. Can anybody tell me how to use the BIND and
UPDATE medhods in the mod_dav.so module of Apache HTTPD server? Thanks very
much!

--
Van

Re: How to run the BIND and UPDATE functions in mod_dav.so module of Apache HTTPD server?

Posted by Ben Reser <be...@reser.org>.
On 1/14/14, 12:10 AM, vancaho wrote:
> How to write these DAV providers?

I'm not sure how much more info I could give short of writing it myself.  The
closest we have to documentation is what's in mod_dav.h.

There's a nice HTMLized version of what's in mod_dav.h here:
http://ci.apache.org/projects/httpd/trunk/doxygen/group__MOD__DAV.html

For BIND you need to implement this (vtable):
http://ci.apache.org/projects/httpd/trunk/doxygen/structdav__hooks__binding.html

For UPDATE you need to implement the update function on the dav_hooks_vsn
struct (vtable):
http://ci.apache.org/projects/httpd/trunk/doxygen/structdav__hooks__vsn.html#a58f63b737fe4264e04066cb59f0813bb

In the end you're probably going to have to read the source of mod_dav and
figure out how to do it as you go.

> Are there any existing DAV providers or examples?

There are only two publicly available DAV providers.  mod_dav_svn (Subversion)
and mod_dav_fs (included with httpd).  Neither of them implement these features.

Someone probably could extend mod_dav_fs to support BIND by using hard or
symbolic links on the local file system.

BIND might be implementable by Subversion by converting it into a svn:special
file.  Though I don't really see a good reason to do this unless there's a DAV
client out there that supports BIND and it's useful to someone when using
autoversioning mode.

UPDATE can't be implemented by mod_dav_fs without a lot of work, since it's
part of the DeltaV protocol which mod_dav_fs doesn't support.  Specifically,
mod_dav_fs would have to grow a whole versioning backend.

UPDATE isn't important to Subversion because we don't allow HEAD to point to
anything other than the last checked-in version.

I'd assume whoever wrote the hooks to support BIND and UPDATE wrote some sort
of code to test it, but I have no idea where that code would even be.  To the
best of my knowledge it's never been published.

Given that it hasn't been used much, it's likely there are bugs that would need
fixing if someone did try to use it.

Re: How to run the BIND and UPDATE functions in mod_dav.so module of Apache HTTPD server?

Posted by vancaho <va...@gmail.com>.
How to write these DAV providers? Are there any existing DAV providers or
examples?
Thanks very much!

2014/1/14 Ben Reser <be...@reser.org>

> On 1/13/14, 12:29 AM, vancaho wrote:
> > Hi everyone,
> >     I'm learning WebDAV protocol with apache httpd server and subversion.
> >     Atfer reading the source code of Mod_Dav.so(which is responsible for
> > interpreting the WebDAV protocol), I find that there are methods
> > dav_method_bind(
> http://www.webdav.org/bind/draft-ietf-webdav-bind-27.html#rfc.section.4.1)
> > and dav_method_update(
> http://www.webdav.org/specs/rfc3253.html#METHOD_UPDATE)
> > which are used to process the "BIND" and "UPDATE" methods.
> >
> >     However I find that the subversion and tortoiseSVN do not support
> "BIND" or
> > "UPDATE" methods. Can anybody tell me how to use the BIND and UPDATE
> medhods in
> > the mod_dav.so module of Apache HTTPD server? Thanks very much!
>
> You'll have to write your own DAV provider that implements these methods.
>
> BIND requires that you setup the binding entry on the dav_provider
> structure
> which is a dav_hooks_binding.
>
> UPDATE requires that you setup the update function on the vsn entry (which
> is a
> dav_hooks_vsn) on the dav_provider structure.
>
> As you've noticed Subversion doesn't implement these since we don't need
> them.
>  To the best of my knowledge no open source DAV provider actually utilizes
> these features.
>

Re: How to run the BIND and UPDATE functions in mod_dav.so module of Apache HTTPD server?

Posted by Ben Reser <be...@reser.org>.
On 1/13/14, 12:29 AM, vancaho wrote:
> Hi everyone,
>     I'm learning WebDAV protocol with apache httpd server and subversion.
>     Atfer reading the source code of Mod_Dav.so(which is responsible for
> interpreting the WebDAV protocol), I find that there are methods
> dav_method_bind(http://www.webdav.org/bind/draft-ietf-webdav-bind-27.html#rfc.section.4.1)
> and dav_method_update(http://www.webdav.org/specs/rfc3253.html#METHOD_UPDATE)
> which are used to process the "BIND" and "UPDATE" methods.
> 
>     However I find that the subversion and tortoiseSVN do not support "BIND" or
> "UPDATE" methods. Can anybody tell me how to use the BIND and UPDATE medhods in
> the mod_dav.so module of Apache HTTPD server? Thanks very much!

You'll have to write your own DAV provider that implements these methods.

BIND requires that you setup the binding entry on the dav_provider structure
which is a dav_hooks_binding.

UPDATE requires that you setup the update function on the vsn entry (which is a
dav_hooks_vsn) on the dav_provider structure.

As you've noticed Subversion doesn't implement these since we don't need them.
 To the best of my knowledge no open source DAV provider actually utilizes
these features.