You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2025/02/07 11:09:26 UTC

svn commit: r1923639 - in /httpd/httpd/trunk: changes-entries/dav-get-base-path.txt include/ap_mmn.h modules/dav/main/mod_dav.c modules/dav/main/mod_dav.h

Author: jorton
Date: Fri Feb  7 11:09:25 2025
New Revision: 1923639

URL: http://svn.apache.org/viewvc?rev=1923639&view=rev
Log:
Add API exposing the DavBasePath setting for use by DAV repository
backend modules (mod_dav_svn needs this for POST method handling).

* modules/dav/main/mod_dav.c (dav_get_base_path): New function.

* include/ap_mmn.h: Bump MMN minor.

Github: closes #513

Added:
    httpd/httpd/trunk/changes-entries/dav-get-base-path.txt
Modified:
    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

Added: httpd/httpd/trunk/changes-entries/dav-get-base-path.txt
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/changes-entries/dav-get-base-path.txt?rev=1923639&view=auto
==============================================================================
--- httpd/httpd/trunk/changes-entries/dav-get-base-path.txt (added)
+++ httpd/httpd/trunk/changes-entries/dav-get-base-path.txt Fri Feb  7 11:09:25 2025
@@ -0,0 +1,2 @@
+  *) mod_dav: Add API to expose DavBasePath setting.  [Joe Orton]
+

Modified: httpd/httpd/trunk/include/ap_mmn.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/ap_mmn.h?rev=1923639&r1=1923638&r2=1923639&view=diff
==============================================================================
--- httpd/httpd/trunk/include/ap_mmn.h (original)
+++ httpd/httpd/trunk/include/ap_mmn.h Fri Feb  7 11:09:25 2025
@@ -733,6 +733,7 @@
  * 20211221.25 (2.5.1-dev) AP_SLASHES and AP_IS_SLASH
  * 20211221.26 (2.5.1-dev) Add is_host_matchable to proxy_worker_shared
  * 20211221.27 (2.5.1-dev) Add sock_proto to proxy_worker_shared, and AP_LISTEN_MPTCP
+ * 20211221.28 (2.5.1-dev) Add dav_get_base_path() to mod_dav
  */
 
 #define MODULE_MAGIC_COOKIE 0x41503235UL /* "AP25" */
@@ -740,7 +741,7 @@
 #ifndef MODULE_MAGIC_NUMBER_MAJOR
 #define MODULE_MAGIC_NUMBER_MAJOR 20211221
 #endif
-#define MODULE_MAGIC_NUMBER_MINOR 27             /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 28             /* 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=1923639&r1=1923638&r2=1923639&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/dav/main/mod_dav.c (original)
+++ httpd/httpd/trunk/modules/dav/main/mod_dav.c Fri Feb  7 11:09:25 2025
@@ -263,6 +263,13 @@ DAV_DECLARE(const dav_hooks_search *) da
     return dav_get_provider(r)->search;
 }
 
+DAV_DECLARE(const char *) dav_get_base_path(request_rec *r)
+{
+    dav_dir_conf *conf = ap_get_module_config(r->per_dir_config, &dav_module);
+
+    return conf && conf->base ? conf->base : NULL;
+}
+
 /*
  * Command handler for the DAV directive, which is TAKE1.
  */

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=1923639&r1=1923638&r2=1923639&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/dav/main/mod_dav.h (original)
+++ httpd/httpd/trunk/modules/dav/main/mod_dav.h Fri Feb  7 11:09:25 2025
@@ -436,6 +436,11 @@ typedef struct dav_locktoken dav_locktok
 DAV_DECLARE(dav_error *) dav_get_resource(request_rec *r, int label_allowed,
                                           int use_checked_in, dav_resource **res_p);
 
+/*
+** If DavBasePath is configured for the request location, return the
+** configured path, otherwise NULL.
+*/
+DAV_DECLARE(const char *) dav_get_base_path(request_rec *r);
 
 /* --------------------------------------------------------------------
 **