]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_dav: Add support for childtags to dav_error.
authorGraham Leggett <minfrin@apache.org>
Mon, 30 May 2016 22:38:23 +0000 (22:38 +0000)
committerGraham Leggett <minfrin@apache.org>
Mon, 30 May 2016 22:38:23 +0000 (22:38 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1746207 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
include/ap_mmn.h
modules/dav/main/mod_dav.c
modules/dav/main/mod_dav.h

diff --git a/CHANGES b/CHANGES
index f8f6f8d9283e718caccd573b9d48ce3d648dae61..11eaa7e853a86f69144f3411b28717129e9efc64 100644 (file)
--- 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 <jari.urpalainen nokia.com>]
+
   *) abs: include OpenSSL_Applink when compiling on Visual Studio 2015 
           and up. PR59630 [Jan Ehrhardt <phpdev ehrhardt.nl>]
 
index 340e986e335530cb97bdafe5886ddc12c0c89245..8ccc9ef6f6c197368d6cc06f5baf1f8316fb935a 100644 (file)
  *                         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" */
 #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
index 75b0881c42c2dff55166bc38977e85bcbdd59e04..45c7a1aa7f87d4f5aa2ab8d5317681aff7f83610 100644 (file)
@@ -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
-                   "<C:%s/>" DEBUG_CR,
-                   err->namespace, err->tagname);
+    if (err->childtags) {
+        if (err->namespace != NULL) {
+            ap_rprintf(r,
+                    " xmlns:C=\"%s\">" DEBUG_CR
+                    "<C:%s>%s</C:%s>" DEBUG_CR,
+                    err->namespace,
+                    err->tagname, err->childtags, err->tagname);
+        }
+        else {
+            ap_rprintf(r,
+                    ">" DEBUG_CR
+                    "<D:%s>%s<D:%s>" DEBUG_CR,
+                    err->tagname, err->childtags, err->tagname);
+        }
     }
     else {
-        ap_rprintf(r,
-                   ">" DEBUG_CR
-                   "<D:%s/>" DEBUG_CR, err->tagname);
+        if (err->namespace != NULL) {
+            ap_rprintf(r,
+                    " xmlns:C=\"%s\">" DEBUG_CR
+                    "<C:%s/>" DEBUG_CR,
+                    err->namespace, err->tagname);
+        }
+        else {
+            ap_rprintf(r,
+                    ">" DEBUG_CR
+                    "<D:%s/>" DEBUG_CR, err->tagname);
+        }
     }
 
     /* here's our mod_dav specific tag: */
index 96088d340663db638cf6cb33ee9a1a450ffd58a3..7aea8a3489c5c76ac78dcc2d090f02d328268d9f 100644 (file)
@@ -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;
 
 /*