You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by mi...@apache.org on 2021/12/10 14:01:30 UTC
svn commit: r1895767 - /httpd/httpd/patches/2.4.x/httpd-2.4-dav-element2.patch
Author: minfrin
Date: Fri Dec 10 14:01:30 2021
New Revision: 1895767
URL: http://svn.apache.org/viewvc?rev=1895767&view=rev
Log:
Add patch with updated mmn.
Added:
httpd/httpd/patches/2.4.x/httpd-2.4-dav-element2.patch
Added: httpd/httpd/patches/2.4.x/httpd-2.4-dav-element2.patch
URL: http://svn.apache.org/viewvc/httpd/httpd/patches/2.4.x/httpd-2.4-dav-element2.patch?rev=1895767&view=auto
==============================================================================
--- httpd/httpd/patches/2.4.x/httpd-2.4-dav-element2.patch (added)
+++ httpd/httpd/patches/2.4.x/httpd-2.4-dav-element2.patch Fri Dec 10 14:01:30 2021
@@ -0,0 +1,141 @@
+Index: changes-entries/mod_dav-element.txt
+===================================================================
+--- changes-entries/mod_dav-element.txt (nonexistent)
++++ changes-entries/mod_dav-element.txt (working copy)
+@@ -0,0 +1,8 @@
++
++ *) mod_dav: Some DAV extensions, like CalDAV, specify both document
++ elements and property elements that need to be taken into account
++ when generating a property. The document element and property element
++ are made available in the dav_liveprop_elem structure by calling
++ dav_get_liveprop_element(). [Graham Leggett]
++
++
+Index: include/ap_mmn.h
+===================================================================
+--- include/ap_mmn.h-orig 2021-12-10 15:54:41.000000000 +0200
++++ include/ap_mmn.h 2021-12-10 15:56:10.000000000 +0200
+@@ -584,6 +584,8 @@
+ * 20120211.119 (2.4.51-dev) Add dav_validate_root_ns(), dav_find_child_ns(),
+ * dav_find_next_ns(), dav_find_attr_ns() and
+ * dav_find_attr().
++ * 20120211.120 (2.4.51-dev) Add dav_liveprop_elem structure and
++ * dav_get_liveprop_element().
+ *
+ */
+
+@@ -592,7 +594,7 @@
+ #ifndef MODULE_MAGIC_NUMBER_MAJOR
+ #define MODULE_MAGIC_NUMBER_MAJOR 20120211
+ #endif
+-#define MODULE_MAGIC_NUMBER_MINOR 119 /* 0...n */
++#define MODULE_MAGIC_NUMBER_MINOR 120 /* 0...n */
+
+ /**
+ * Determine if the server's current MODULE_MAGIC_NUMBER is at least a
+Index: modules/dav/main/mod_dav.h
+===================================================================
+--- modules/dav/main/mod_dav.h (revision 1893643)
++++ modules/dav/main/mod_dav.h (working copy)
+@@ -893,6 +893,14 @@
+ ** property, and does not want it handled as a dead property, it should
+ ** return DAV_PROP_INSERT_NOTSUPP.
+ **
++ ** Some DAV extensions, like CalDAV, specify both document elements
++ ** and property elements that need to be taken into account when
++ ** generating a property. The document element and property element
++ ** are made available in the dav_liveprop_elem structure under the
++ ** resource, accessible as follows:
++ **
++ ** dav_get_liveprop_element(resource);
++ **
+ ** Returns one of DAV_PROP_INSERT_* based on what happened.
+ **
+ ** ### we may need more context... ie. the lock database
+@@ -1040,7 +1048,19 @@
+ DAV_DECLARE(void) dav_add_all_liveprop_xmlns(apr_pool_t *p,
+ apr_text_header *phdr);
+
++typedef struct {
++ const apr_xml_doc *doc;
++ const apr_xml_elem *elem;
++} dav_liveprop_elem;
++
+ /*
++ ** When calling insert_prop(), the associated request element and
++ ** document is accessible using the following call.
++ */
++DAV_DECLARE(dav_liveprop_elem *) dav_get_liveprop_element(const dav_resource
++ *resource);
++
++/*
+ ** The following three functions are part of mod_dav's internal handling
+ ** for the core WebDAV properties. They are not part of mod_dav's API.
+ */
+Index: modules/dav/main/props.c
+===================================================================
+--- modules/dav/main/props.c (revision 1893643)
++++ modules/dav/main/props.c (working copy)
+@@ -167,6 +167,8 @@
+
+ #define DAV_EMPTY_VALUE "\0" /* TWO null terms */
+
++#define DAV_PROP_ELEMENT "mod_dav-element"
++
+ struct dav_propdb {
+ apr_pool_t *p; /* the pool we should use */
+ request_rec *r; /* the request record */
+@@ -718,10 +720,18 @@
+ apr_text_header hdr_ns = { 0 };
+ int have_good = 0;
+ dav_get_props_result result = { 0 };
++ dav_liveprop_elem *element;
+ char *marks_liveprop;
+ dav_xmlns_info *xi;
+ int xi_filled = 0;
+
++ /* we lose both the document and the element when calling (insert_prop),
++ * make these available in the pool.
++ */
++ element = apr_pcalloc(propdb->resource->pool, sizeof(dav_liveprop_elem));
++ element->doc = doc;
++ apr_pool_userdata_setn(element, DAV_PROP_ELEMENT, NULL, propdb->resource->pool);
++
+ /* ### NOTE: we should pass in TWO buffers -- one for keys, one for
+ the marks */
+
+@@ -745,6 +755,8 @@
+ dav_prop_insert inserted;
+ dav_prop_name name;
+
++ element->elem = elem;
++
+ /*
+ ** First try live property providers; if they don't handle
+ ** the property, then try looking it up in the propdb.
+@@ -922,6 +934,15 @@
+ }
+ }
+
++DAV_DECLARE(dav_liveprop_elem *) dav_get_liveprop_element(const dav_resource *resource)
++{
++ dav_liveprop_elem *element;
++
++ apr_pool_userdata_get((void **)&element, DAV_PROP_ELEMENT, resource->pool);
++
++ return element;
++}
++
+ DAV_DECLARE_NONSTD(void) dav_prop_validate(dav_prop_ctx *ctx)
+ {
+ dav_propdb *propdb = ctx->propdb;
+Index: .
+===================================================================
+--- . (revision 1893643)
++++ . (working copy)
+
+Property changes on: .
+___________________________________________________________________
+Modified: svn:mergeinfo
+## -0,0 +0,1 ##
+ Merged /httpd/httpd/trunk:r1879889,1893643-1893644