Ben Reser <b...@reser.org> writes:

> On Tue, Feb 19, 2013 at 8:03 AM, Philip Martin
> <philip.mar...@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

Reply via email to