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.
git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/http-dynamic-prop-namespaces@1398971 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/subversion/mod_dav_svn/dav_svn.h b/subversion/mod_dav_svn/dav_svn.h
index 48e13ef..c516335 100644
--- a/subversion/mod_dav_svn/dav_svn.h
+++ b/subversion/mod_dav_svn/dav_svn.h
@@ -340,6 +340,10 @@
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
diff --git a/subversion/mod_dav_svn/mod_dav_svn.c b/subversion/mod_dav_svn/mod_dav_svn.c
index 8eeb146..2791db7 100644
--- a/subversion/mod_dav_svn/mod_dav_svn.c
+++ b/subversion/mod_dav_svn/mod_dav_svn.c
@@ -820,6 +820,21 @@
}
+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.
*/
diff --git a/subversion/mod_dav_svn/version.c b/subversion/mod_dav_svn/version.c
index d6b3d2d..0dabfc3 100644
--- a/subversion/mod_dav_svn/version.c
+++ b/subversion/mod_dav_svn/version.c
@@ -149,7 +149,6 @@
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 @@
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;