From: Graham Leggett Date: Sun, 12 Jun 2016 00:58:09 +0000 (+0000) Subject: mod_dav: Add dav_get_provider_name() function to obtain the name X-Git-Tag: 2.5.0-alpha~1511 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5405da141a824ee3e629464740662f8e5cc3a213;p=thirdparty%2Fapache%2Fhttpd.git mod_dav: Add dav_get_provider_name() function to obtain the name of the provider from mod_dav. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1747946 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 7f7225944cc..456aa6a8e8f 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,10 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 + *) mod_dav: Add dav_get_provider_name() function to obtain the name + of the provider from mod_dav. + [Jari Urpalainen ] + *) mod_proxy_fcgi: Avoid passing a filename of proxy:fcgi:// as SCRIPT_FILENAME to a FastCGI server. PR59618. [Jacob Champion ] diff --git a/include/ap_mmn.h b/include/ap_mmn.h index 0e0327a21f4..7dd811bc9dd 100644 --- a/include/ap_mmn.h +++ b/include/ap_mmn.h @@ -525,6 +525,7 @@ * and optional ssl_engine_set() to mod_ssl.h. * 20160315.3 (2.5.0-dev) Add childtags to dav_error. * 20160608.1 (2.5.0-dev) Rename ap_casecmpstr[n]() to ap_cstr_casecmp[n]() + * 20160608.2 (2.5.0-dev) Add dav_get_provider_name. */ #define MODULE_MAGIC_COOKIE 0x41503235UL /* "AP25" */ @@ -532,7 +533,7 @@ #ifndef MODULE_MAGIC_NUMBER_MAJOR #define MODULE_MAGIC_NUMBER_MAJOR 20160608 #endif -#define MODULE_MAGIC_NUMBER_MINOR 1 /* 0...n */ +#define MODULE_MAGIC_NUMBER_MINOR 2 /* 0...n */ /** * Determine if the server's current MODULE_MAGIC_NUMBER is at least a diff --git a/modules/dav/main/mod_dav.c b/modules/dav/main/mod_dav.c index d35c75ae0bd..1459acc1b68 100644 --- a/modules/dav/main/mod_dav.c +++ b/modules/dav/main/mod_dav.c @@ -201,6 +201,12 @@ static void *dav_merge_dir_config(apr_pool_t *p, void *base, void *overrides) return newconf; } +DAV_DECLARE(const char *) dav_get_provider_name(request_rec *r) +{ + dav_dir_conf *conf = ap_get_module_config(r->per_dir_config, &dav_module); + return conf ? conf->provider_name : NULL; +} + static const dav_provider *dav_get_provider(request_rec *r) { dav_dir_conf *conf; diff --git a/modules/dav/main/mod_dav.h b/modules/dav/main/mod_dav.h index 7aea8a3489c..6104ae6997e 100644 --- a/modules/dav/main/mod_dav.h +++ b/modules/dav/main/mod_dav.h @@ -667,6 +667,7 @@ DAV_DECLARE(const dav_hooks_search *) dav_get_search_hooks(request_rec *r); DAV_DECLARE(void) dav_register_provider(apr_pool_t *p, const char *name, const dav_provider *hooks); DAV_DECLARE(const dav_provider *) dav_lookup_provider(const char *name); +DAV_DECLARE(const char *) dav_get_provider_name(request_rec *r); /* ### deprecated */