On 11/9/22 2:12 AM, manu@apache.org wrote:
> Author: manu
> Date: Wed Nov 9 01:12:26 2022
> New Revision: 1905170
>
> URL: http://svn.apache.org/viewvc?rev=1905170&view=rev
> Log:
> Turn DavLockDiscovery into a flag
>
> As requested on dev@httpd.apache.org, turn DavLockDiscovery into a Flag.
> Expressions can still be used by enclosing the directive by
> <If "expr">...</If>
>
>
> Modified:
> httpd/httpd/trunk/modules/dav/main/mod_dav.c
>
> 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=1905170&r1=1905169&r2=1905170&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/modules/dav/main/mod_dav.c (original)
> +++ httpd/httpd/trunk/modules/dav/main/mod_dav.c Wed Nov 9 01:12:26 2022
> @@ -83,7 +83,7 @@ typedef struct {
> const char *dir;
> int locktimeout;
> int allow_depthinfinity;
> - ap_expr_info_t *allow_lockdiscovery;
> + int allow_lockdiscovery;
>
> } dav_dir_conf;
>
> @@ -160,6 +160,8 @@ static void *dav_create_dir_config(apr_p
>
> conf = (dav_dir_conf *)apr_pcalloc(p, sizeof(*conf));
>
> + conf->allow_lockdiscovery = DAV_ENABLED_ON;
> +
Better do not set it here, but leave it to 0 aka DAV_ENABLED_UNSET.
This makes it possible to use DAV_INHERIT_VALUE in dav_merge_dir_config
The corresponding code for dav_merge_dir_config is missing in this this patch.
> /* clean up the directory to remove any trailing slash */
> if (dir != NULL) {
> char *d;
Otherwise good first commit. Thanks for taking care.
Would you provide some documentation for the new directive in docs/manual/mod/mod_dav.xml to make it perfect?
Have a look here how to update the html after you adjusted the xml file:
https://httpd.apache.org/docs-project/docsformat.html
Typically the change to the xml file and the updated html files are committed separately e.g. look at
http://svn.apache.org/viewvc?rev=1904805&view=rev
http://svn.apache.org/viewvc?rev=1904806&view=rev
Regards
Rüdiger
> Author: manu
> Date: Wed Nov 9 01:12:26 2022
> New Revision: 1905170
>
> URL: http://svn.apache.org/viewvc?rev=1905170&view=rev
> Log:
> Turn DavLockDiscovery into a flag
>
> As requested on dev@httpd.apache.org, turn DavLockDiscovery into a Flag.
> Expressions can still be used by enclosing the directive by
> <If "expr">...</If>
>
>
> Modified:
> httpd/httpd/trunk/modules/dav/main/mod_dav.c
>
> 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=1905170&r1=1905169&r2=1905170&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/modules/dav/main/mod_dav.c (original)
> +++ httpd/httpd/trunk/modules/dav/main/mod_dav.c Wed Nov 9 01:12:26 2022
> @@ -83,7 +83,7 @@ typedef struct {
> const char *dir;
> int locktimeout;
> int allow_depthinfinity;
> - ap_expr_info_t *allow_lockdiscovery;
> + int allow_lockdiscovery;
>
> } dav_dir_conf;
>
> @@ -160,6 +160,8 @@ static void *dav_create_dir_config(apr_p
>
> conf = (dav_dir_conf *)apr_pcalloc(p, sizeof(*conf));
>
> + conf->allow_lockdiscovery = DAV_ENABLED_ON;
> +
Better do not set it here, but leave it to 0 aka DAV_ENABLED_UNSET.
This makes it possible to use DAV_INHERIT_VALUE in dav_merge_dir_config
The corresponding code for dav_merge_dir_config is missing in this this patch.
> /* clean up the directory to remove any trailing slash */
> if (dir != NULL) {
> char *d;
Otherwise good first commit. Thanks for taking care.
Would you provide some documentation for the new directive in docs/manual/mod/mod_dav.xml to make it perfect?
Have a look here how to update the html after you adjusted the xml file:
https://httpd.apache.org/docs-project/docsformat.html
Typically the change to the xml file and the updated html files are committed separately e.g. look at
http://svn.apache.org/viewvc?rev=1904805&view=rev
http://svn.apache.org/viewvc?rev=1904806&view=rev
Regards
Rüdiger