From: Graham Leggett Date: Mon, 30 May 2016 22:38:23 +0000 (+0000) Subject: mod_dav: Add support for childtags to dav_error. X-Git-Tag: 2.5.0-alpha~1546 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b40a42160626c30e5f0e08a5fa0db7c9fcaeace2;p=thirdparty%2Fapache%2Fhttpd.git mod_dav: Add support for childtags to dav_error. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1746207 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index f8f6f8d9283..11eaa7e853a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 + *) mod_dav: Add support for childtags to dav_error. + [Jari Urpalainen ] + *) abs: include OpenSSL_Applink when compiling on Visual Studio 2015 and up. PR59630 [Jan Ehrhardt ] diff --git a/include/ap_mmn.h b/include/ap_mmn.h index 340e986e335..8ccc9ef6f6c 100644 --- a/include/ap_mmn.h +++ b/include/ap_mmn.h @@ -523,6 +523,7 @@ * ap_proxy_connection_create_ex() and section_config * to struct proxy_{worker,balancer} in mod_proxy.h, * and optional ssl_engine_set() to mod_ssl.h. + * 20160315.3 (2.5.0-dev) Add childtags to dav_error. */ #define MODULE_MAGIC_COOKIE 0x41503235UL /* "AP25" */ @@ -530,7 +531,7 @@ #ifndef MODULE_MAGIC_NUMBER_MAJOR #define MODULE_MAGIC_NUMBER_MAJOR 20160315 #endif -#define MODULE_MAGIC_NUMBER_MINOR 2 /* 0...n */ +#define MODULE_MAGIC_NUMBER_MINOR 3 /* 0...n */ /** * Determine if the server's current MODULE_MAGIC_NUMBER is at least a diff --git a/modules/dav/main/mod_dav.c b/modules/dav/main/mod_dav.c index 75b0881c42c..45c7a1aa7f8 100644 --- a/modules/dav/main/mod_dav.c +++ b/modules/dav/main/mod_dav.c @@ -358,16 +358,33 @@ static int dav_error_response_tag(request_rec *r, ap_rputs(" xmlns:m=\"http://apache.org/dav/xmlns\"", r); } - if (err->namespace != NULL) { - ap_rprintf(r, - " xmlns:C=\"%s\">" DEBUG_CR - "" DEBUG_CR, - err->namespace, err->tagname); + if (err->childtags) { + if (err->namespace != NULL) { + ap_rprintf(r, + " xmlns:C=\"%s\">" DEBUG_CR + "%s" DEBUG_CR, + err->namespace, + err->tagname, err->childtags, err->tagname); + } + else { + ap_rprintf(r, + ">" DEBUG_CR + "%s" DEBUG_CR, + err->tagname, err->childtags, err->tagname); + } } else { - ap_rprintf(r, - ">" DEBUG_CR - "" DEBUG_CR, err->tagname); + if (err->namespace != NULL) { + ap_rprintf(r, + " xmlns:C=\"%s\">" DEBUG_CR + "" DEBUG_CR, + err->namespace, err->tagname); + } + else { + ap_rprintf(r, + ">" DEBUG_CR + "" DEBUG_CR, err->tagname); + } } /* here's our mod_dav specific tag: */ diff --git a/modules/dav/main/mod_dav.h b/modules/dav/main/mod_dav.h index 96088d34066..7aea8a3489c 100644 --- a/modules/dav/main/mod_dav.h +++ b/modules/dav/main/mod_dav.h @@ -130,6 +130,8 @@ typedef struct dav_error { struct dav_error *prev; /* previous error (in stack) */ + const char *childtags; /* error-tag may have children */ + } dav_error; /*