You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by cm...@apache.org on 2012/10/16 22:08:42 UTC

svn commit: r1398971 - in /subversion/branches/http-dynamic-prop-namespaces/subversion/mod_dav_svn: dav_svn.h mod_dav_svn.c version.c

Author: cmpilato
Date: Tue Oct 16 20:08:42 2012
New Revision: 1398971

URL: http://svn.apache.org/viewvc?rev=1398971&view=rev
Log:
On the 'http-dynamic-prop-namespaces' branch: Don't advertise support
for extensible property namespaces if proxying to a pre-1.8 master
server.

* subversion/mod_dav_svn/dav_svn.h,
* subversion/mod_dav_svn/mod_dav_svn.c
  (dav_svn__check_prop_ext_ns_support): New function.

* subversion/mod_dav_svn/version.c
  (get_vsn_options): Don't advertise extensible property namespace
    support here.
  (get_option): Instead, do it here, though not mindlessly.  Rather,
    use dav_svn__check_prop_ext_ns_support() to decide whether to
    advertise it.

Modified:
    subversion/branches/http-dynamic-prop-namespaces/subversion/mod_dav_svn/dav_svn.h
    subversion/branches/http-dynamic-prop-namespaces/subversion/mod_dav_svn/mod_dav_svn.c
    subversion/branches/http-dynamic-prop-namespaces/subversion/mod_dav_svn/version.c

Modified: subversion/branches/http-dynamic-prop-namespaces/subversion/mod_dav_svn/dav_svn.h
URL: http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/mod_dav_svn/dav_svn.h?rev=1398971&r1=1398970&r2=1398971&view=diff
==============================================================================
--- subversion/branches/http-dynamic-prop-namespaces/subversion/mod_dav_svn/dav_svn.h (original)
+++ subversion/branches/http-dynamic-prop-namespaces/subversion/mod_dav_svn/dav_svn.h Tue Oct 16 20:08:42 2012
@@ -340,6 +340,10 @@ svn_boolean_t dav_svn__check_httpv2_supp
    txnprop support be advertised?  */
 svn_boolean_t dav_svn__check_ephemeral_txnprops_support(request_rec *r);
 
+/* For the repository referred to by this request, should support for
+   property on-the-wire XML namespaces under the extensible namespace
+   URI be advertised?  */
+svn_boolean_t dav_svn__check_prop_ext_ns_support(request_rec *r);
 
 
 /* SPECIAL URI

Modified: subversion/branches/http-dynamic-prop-namespaces/subversion/mod_dav_svn/mod_dav_svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/mod_dav_svn/mod_dav_svn.c?rev=1398971&r1=1398970&r2=1398971&view=diff
==============================================================================
--- subversion/branches/http-dynamic-prop-namespaces/subversion/mod_dav_svn/mod_dav_svn.c (original)
+++ subversion/branches/http-dynamic-prop-namespaces/subversion/mod_dav_svn/mod_dav_svn.c Tue Oct 16 20:08:42 2012
@@ -820,6 +820,21 @@ dav_svn__check_ephemeral_txnprops_suppor
 }
 
 
+svn_boolean_t
+dav_svn__check_prop_ext_ns_support(request_rec *r)
+{
+  svn_version_t *version = dav_svn__get_master_version(r);
+
+  /* We know this server supports extensible property namespaces.  But
+     if we're proxying requests to a master server, we need to see if
+     it supports them, too.  */
+  if (version && (! svn_version__at_least(version, 1, 8, 0)))
+    return FALSE;
+
+  return TRUE;
+}
+
+
 /* FALSE if path authorization should be skipped.
  * TRUE if either the bypass or the apache subrequest methods should be used.
  */

Modified: subversion/branches/http-dynamic-prop-namespaces/subversion/mod_dav_svn/version.c
URL: http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/mod_dav_svn/version.c?rev=1398971&r1=1398970&r2=1398971&view=diff
==============================================================================
--- subversion/branches/http-dynamic-prop-namespaces/subversion/mod_dav_svn/version.c (original)
+++ subversion/branches/http-dynamic-prop-namespaces/subversion/mod_dav_svn/version.c Tue Oct 16 20:08:42 2012
@@ -149,7 +149,6 @@ get_vsn_options(apr_pool_t *p, apr_text_
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_ATOMIC_REVPROPS);
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_PARTIAL_REPLAY);
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_INHERITED_PROPS);
-  apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_PROP_EXT_NS);
   /* Mergeinfo is a special case: here we merely say that the server
    * knows how to handle mergeinfo -- whether the repository does too
    * is a separate matter.
@@ -204,6 +203,12 @@ get_option(const dav_resource *resource,
                      SVN_DAV_NS_DAV_SVN_EPHEMERAL_TXNPROPS);
     }
 
+  if (dav_svn__check_prop_ext_ns_support(r))
+    {
+      apr_table_addn(r->headers_out, "DAV",
+                     SVN_DAV_NS_DAV_SVN_PROP_EXT_NS);
+    }
+
   if (resource->info->repos->fs)
     {
       svn_error_t *serr;