Skip to content
  • Joe Orton's avatar
    Merge r1769718, r1785943, r1786110, r1786119 from trunk: · 9e419e1c
    Joe Orton authored
    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 callback...
    9e419e1c
To find the state of this project's repository at the time of any of these versions, check out the tags.