Re: svn commit: r1879306 - in /httpd/httpd/trunk: CHANGES include/ap_mmn.h modules/dav/main/mod_dav.c modules/dav/main/mod_dav.h

2020-06-28 Thread Graham Leggett
On 28 Jun 2020, at 15:33, Greg Stein  wrote:

> Hey Graham ... what's the goal with exposing these things? (this rev, and 
> prior) ... I don't see any emails describing "why". Generally, it would be 
> "shrug" ... but you're changing the MMN, and I don't see any discussion on 
> why/goal.

Picking up the CalDAV work again.

Since mod_dav was written there have been a host of RFCs that use the REPORT 
method, but mod_dav is written in such a way that only a versioning 
implementation is allowed to use REPORT.

This has led to some offensive workarounds (an input filter to try and undo the 
read of a report after finding the report wasn’t for that module, yuck yuck 
yuck).

Two works-in-progress:

https://github.com/minfrin/mod_dav_calendar - RFC4791 Calendaring Extensions to 
WebDAV
https://github.com/minfrin/mod_dav_access - RFC3744 WebDav Access Control 
Protocol

CalDAV mandates strong ETags as per 
https://tools.ietf.org/html/rfc4791#section-5.3.4, and Apple Calendar breaks 
decisively without it.

Regards,
Graham
—



Re: svn commit: r1879306 - in /httpd/httpd/trunk: CHANGES include/ap_mmn.h modules/dav/main/mod_dav.c modules/dav/main/mod_dav.h

2020-06-28 Thread Greg Stein
Hey Graham ... what's the goal with exposing these things? (this rev, and
prior) ... I don't see any emails describing "why". Generally, it would be
"shrug" ... but you're changing the MMN, and I don't see any discussion on
why/goal.

Thanks,
-g


On Sun, Jun 28, 2020 at 8:17 AM  wrote:

> Author: minfrin
> Date: Sun Jun 28 13:17:26 2020
> New Revision: 1879306
>
> URL: http://svn.apache.org/viewvc?rev=1879306=rev
> Log:
> Add hooks deliver_report and gather_reports to mod_dav.h. Allows other
> modules apart from versioning implementations to handle the REPORT method.
>
> Modified:
> httpd/httpd/trunk/CHANGES
> httpd/httpd/trunk/include/ap_mmn.h
> httpd/httpd/trunk/modules/dav/main/mod_dav.c
> httpd/httpd/trunk/modules/dav/main/mod_dav.h
>
> Modified: httpd/httpd/trunk/CHANGES
> URL:
> http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1879306=1879305=1879306=diff
>
> ==
> --- httpd/httpd/trunk/CHANGES [utf-8] (original)
> +++ httpd/httpd/trunk/CHANGES [utf-8] Sun Jun 28 13:17:26 2020
> @@ -1,6 +1,10 @@
>   -*- coding:
> utf-8 -*-
>  Changes with Apache 2.5.1
>
> +  *) Add hooks deliver_report and gather_reports to mod_dav.h. Allows
> other
> + modules apart from versioning implementations to handle the REPORT
> method.
> + [Graham Leggett]
> +
>*) Add dav_get_provider(), dav_open_lockdb() and dav_close_lockdb()
> mod_dav.h.
>   [Graham Leggett]
>
>
> Modified: httpd/httpd/trunk/include/ap_mmn.h
> URL:
> http://svn.apache.org/viewvc/httpd/httpd/trunk/include/ap_mmn.h?rev=1879306=1879305=1879306=diff
>
> ==
> --- httpd/httpd/trunk/include/ap_mmn.h (original)
> +++ httpd/httpd/trunk/include/ap_mmn.h Sun Jun 28 13:17:26 2020
> @@ -643,6 +643,8 @@
>   * Add bnotes to request_rec.
>   * 20200420.8 (2.5.1-dev)  Add dav_get_provider(), dav_open_lockdb() and
>   * dav_close_lockdb() mod_dav.h.
> + * 20200420.9 (2.5.1-dev)  Add hooks deliver_report and gather_reports to
> + * mod_dav.h.
>   */
>
>  #define MODULE_MAGIC_COOKIE 0x41503235UL /* "AP25" */
> @@ -650,7 +652,7 @@
>  #ifndef MODULE_MAGIC_NUMBER_MAJOR
>  #define MODULE_MAGIC_NUMBER_MAJOR 20200420
>  #endif
> -#define MODULE_MAGIC_NUMBER_MINOR 8/* 0...n */
> +#define MODULE_MAGIC_NUMBER_MINOR 9/* 0...n */
>
>  /**
>   * Determine if the server's current MODULE_MAGIC_NUMBER is at least a
>
> Modified: httpd/httpd/trunk/modules/dav/main/mod_dav.c
> URL:
> http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/dav/main/mod_dav.c?rev=1879306=1879305=1879306=diff
>
> ==
> --- httpd/httpd/trunk/modules/dav/main/mod_dav.c (original)
> +++ httpd/httpd/trunk/modules/dav/main/mod_dav.c Sun Jun 28 13:17:26 2020
> @@ -5005,6 +5005,8 @@ APR_HOOK_STRUCT(
>  APR_HOOK_LINK(gather_propsets)
>  APR_HOOK_LINK(find_liveprop)
>  APR_HOOK_LINK(insert_all_liveprops)
> +APR_HOOK_LINK(deliver_report)
> +APR_HOOK_LINK(gather_reports)
>  )
>
>  APR_IMPLEMENT_EXTERNAL_HOOK_VOID(dav, DAV, gather_propsets,
> @@ -5021,3 +5023,16 @@ APR_IMPLEMENT_EXTERNAL_HOOK_VOID(dav, DA
>   (request_rec *r, const dav_resource
> *resource,
>dav_prop_insert what, apr_text_header
> *phdr),
>   (r, resource, what, phdr))
> +
> +APR_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST(dav, DAV, int, deliver_report,
> +  (request_rec *r,
> +   const dav_resource *resource,
> +   const apr_xml_doc *doc,
> +   ap_filter_t *output, dav_error
> **err),
> +  (r, resource, doc, output, err),
> DECLINED)
> +
> +APR_IMPLEMENT_EXTERNAL_HOOK_VOID(dav, DAV, gather_reports,
> +   (request_rec *r, const dav_resource
> *resource,
> +apr_array_header_t *reports,
> dav_error **err),
> +   (r, resource, reports, err))
> +
>
> Modified: httpd/httpd/trunk/modules/dav/main/mod_dav.h
> URL:
> http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/dav/main/mod_dav.h?rev=1879306=1879305=1879306=diff
>
> ==
> --- httpd/httpd/trunk/modules/dav/main/mod_dav.h (original)
> +++ httpd/httpd/trunk/modules/dav/main/mod_dav.h Sun Jun 28 13:17:26 2020
> @@ -650,10 +650,10 @@ DAV_DECLARE(void) dav_xmlns_generate(dav
>  ** mod_dav 1.0). There are too many dependencies between a dav_resource
>  ** (defined by ) and the other functionality.
>  **
> -** Live properties are not part