]> granicus.if.org Git - apache/commit
Merge r1769718, r1785943, r1786110, r1786119 from trunk:
authorJoe Orton <jorton@apache.org>
Thu, 31 May 2018 15:10:26 +0000 (15:10 +0000)
committerJoe Orton <jorton@apache.org>
Thu, 31 May 2018 15:10:26 +0000 (15:10 +0000)
commitcbc7414482da44d98d464ebf8025ae6b467d38d8
tree3248c8f10497ed0746cd6d4549ea1a68fb9f5f9d
parent7a98d7b4f22107ec1dd7cfb9fca6c224500f4f68
Merge r1769718, r1785943, r1786110, r1786119 from trunk:

add an <IfFile> config section like <IfDefine>

It allows a non httpd config file to be used as a marker directly in
httpd.conf without hiding logic in a script in front of apachectl
to do test -f and pass extra -D's.

This is something we've had in IBM's httpd distro for a little bit and
hadn't remembered to share. I've seen some questions/config files come
up in a few places lately that would benefit from this as an option.

Remove duplicate implementations of conditional section function.  No
functional change.

* server/core.c (start_cond_section): Factor out from start_if*.
  Adjust to use apr_strmemdup.
  (test_ifmod_section, test_iffile_section, test_ifdefine_section):
  Move container-specific tests into callbacks from start_if*.
  (core_cmds): Adjust <IfFile, <IfDefine, <IfModule to use
  start_cond_section with callbacks.

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.

* server/core.c (start_cond_section): Comment & variable name fixes,
  no functional change.

Submitted by: covener, jorton
Reviewed by: jorton, ylavic, covener

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1832623 13f79535-47bb-0310-9956-ffa450edef68
CHANGES
STATUS
docs/manual/mod/core.xml
include/ap_mmn.h
include/http_config.h
server/config.c
server/core.c