[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: WebDAV proxy feature "negotiation" -- there's *got* to be a better way.

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Tue, 19 Feb 2013 18:40:21 +0000

Ben Reser <ben_at_reser.org> writes:

> On Tue, Feb 19, 2013 at 8:03 AM, Philip Martin
> <philip.martin_at_wandisco.com> wrote:
>> When the client sends the OPTIONS request to the proxy mod_dav calls
>> into mod_dav_svn/version.c:get_option. Is it possible for mod_dav_svn
>> to send an OPTIONS request to the master at that stage? I suppose
>> that's a not quite the same as the proxy mechanism used for other
>> requests.
>
> Seems to me this is what you would need to do. Using a configuration
> option signals a need to keep the configuration option in sync with
> the master. If you don't use a configuration option then you
> shouldn't have to maintain anything. If you cache the version on the
> proxy then the proxy needs to be restarted whenever the master
> changes. Which isn't particularly intuitive.

Without really understanding the mirror code I tried to simply proxy the
OPTIONS request:

Index: subversion/mod_dav_svn/mirror.c
===================================================================
--- subversion/mod_dav_svn/mirror.c (revision 1447804)
+++ subversion/mod_dav_svn/mirror.c (working copy)
@@ -88,8 +88,7 @@ int dav_svn__proxy_request_fixup(request_rec *r)
         const char *seg;
 
         /* We know we can always safely handle these. */
- if (r->method_number == M_REPORT ||
- r->method_number == M_OPTIONS) {
+ if (r->method_number == M_REPORT) {
             return OK;
         }
 
@@ -123,6 +122,7 @@ int dav_svn__proxy_request_fixup(request_rec *r)
         if (seg && (r->method_number == M_MERGE ||
                     r->method_number == M_LOCK ||
                     r->method_number == M_UNLOCK ||
+ r->method_number == M_OPTIONS ||
                     ap_strstr_c(seg, special_uri))) {
             int rv;
             seg += strlen(root_dir);

That does allow me to commit using a 1.8 client through a 1.8 proxy to a
1.7 master without specifying SVNMasterVersion.

It's obviously not a real solution. We cannot simply pass on the
master's OPTIONS response as the master may be newer than the proxy; we
probably need the proxy to do some filtering of the response. Also it
caused ra_serf to segv if the path in the slave Location wasn't
identical to the path in the master Location.

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download
Received on 2013-02-19 19:47:44 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.