diff options
author | Joe Orton <jorton@apache.org> | 2017-03-09 08:39:56 +0000 |
---|---|---|
committer | Joe Orton <jorton@apache.org> | 2017-03-09 08:39:56 +0000 |
commit | ec40c3c1977e2d48c0a0ba88851d396194de271b (patch) | |
tree | 7678152d978eeeef552e08fa88d512e0ccdde155 /server/config.c | |
parent | cf85d9f6e6fb68f7ca6cfd59b8fa4c6245e682bd (diff) | |
download | httpd-ec40c3c1977e2d48c0a0ba88851d396194de271b.tar.gz |
Add <IfDirective> and <IfSection>:
* server/core.c
(test_ifdirective_section, test_ifsection_section): New callbacks.
(core_cmds): Define new directives.
* include/http_config.h, server/config.c (ap_exists_directive):
New function.
* include/ap_mmn.h: Bump MMN minor for above.
* docs/manual/mod/core.xml: Add docs.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1786110 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/config.c')
-rw-r--r-- | server/config.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/server/config.c b/server/config.c index 8e591dfc7f..5af0e2d2de 100644 --- a/server/config.c +++ b/server/config.c @@ -2668,6 +2668,16 @@ AP_DECLARE(void) ap_show_modules(void) printf(" %s\n", ap_loaded_modules[n]->name); } +AP_DECLARE(int) ap_exists_directive(apr_pool_t *p, const char *name) +{ + char *lname = apr_pstrdup(p, name); + + ap_str_tolower(lname); + + return ap_config_hash && + apr_hash_get(ap_config_hash, lname, APR_HASH_KEY_STRING) != NULL; +} + AP_DECLARE(void *) ap_retained_data_get(const char *key) { void *retained; |