Skip to content

Commit c43d8e9

Browse files
committed
Merge r1923639 from trunk:
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 #526 Reviewed by: jorton, rpluem, covener git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1926064 13f79535-47bb-0310-9956-ffa450edef68
1 parent 3dec975 commit c43d8e9

File tree

4 files changed

+16
-1
lines changed

4 files changed

+16
-1
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*) mod_dav: Add API to expose DavBasePath setting. [Joe Orton]
2+

include/ap_mmn.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,14 +608,15 @@
608608
* 20120211.136 (2.4.63-dev) Add wait_io field to struct process_score
609609
* 20120211.137 (2.4.63-dev) Add AP_MPMQ_CAN_WAITIO
610610
* 20120211.138 (2.4.63-dev) Add is_host_matchable to proxy_worker_shared
611+
* 20120211.139 (2.4.63-dev) Add dav_get_base_path() to mod_dav
611612
*/
612613

613614
#define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
614615

615616
#ifndef MODULE_MAGIC_NUMBER_MAJOR
616617
#define MODULE_MAGIC_NUMBER_MAJOR 20120211
617618
#endif
618-
#define MODULE_MAGIC_NUMBER_MINOR 138 /* 0...n */
619+
#define MODULE_MAGIC_NUMBER_MINOR 139 /* 0...n */
619620

620621
/**
621622
* Determine if the server's current MODULE_MAGIC_NUMBER is at least a

modules/dav/main/mod_dav.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,13 @@ DAV_DECLARE(const dav_hooks_search *) dav_get_search_hooks(request_rec *r)
250250
return dav_get_provider(r)->search;
251251
}
252252

253+
DAV_DECLARE(const char *) dav_get_base_path(request_rec *r)
254+
{
255+
dav_dir_conf *conf = ap_get_module_config(r->per_dir_config, &dav_module);
256+
257+
return conf && conf->base ? conf->base : NULL;
258+
}
259+
253260
/*
254261
* Command handler for the DAV directive, which is TAKE1.
255262
*/

modules/dav/main/mod_dav.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,11 @@ typedef struct dav_locktoken dav_locktoken;
430430
DAV_DECLARE(dav_error *) dav_get_resource(request_rec *r, int label_allowed,
431431
int use_checked_in, dav_resource **res_p);
432432

433+
/*
434+
** If DavBasePath is configured for the request location, return the
435+
** configured path, otherwise NULL.
436+
*/
437+
DAV_DECLARE(const char *) dav_get_base_path(request_rec *r);
433438

434439
/* --------------------------------------------------------------------
435440
**

0 commit comments

Comments
 (0)