summaryrefslogtreecommitdiff
path: root/server/config.c
Commit message (Collapse)AuthorAgeFilesLines
* core: Set ap_server_conf ASAP.Yann Ylavic2023-03-141-0/+3
| | | | | | | | | | | | | * server/config.c(ap_read_config): Set ap_server_conf as soon as it exists (with defaults). * server/main.c(main): Now that ap_server_conf is set by ap_read_config(), just make sure it's not NULL afterward with an ap_assert()ion. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908393 13f79535-47bb-0310-9956-ffa450edef68
* Rearrange and clear global core config state allocated out of pconfJoe Orton2020-12-081-1/+0
| | | | | | | | | | from a single cleanup: * server/core.c (reset_config): Clear ap_runtime_dir here, rather than in register_hooks. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1884208 13f79535-47bb-0310-9956-ffa450edef68
* config: Speed up graceful restarts by using pre-hashed command table. PR 64066.Jim Jagielski2020-01-141-3/+7
| | | | | | | [Giovanni Bechis <giovanni paclan.it>, Jim Jagielski] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1872786 13f79535-47bb-0310-9956-ffa450edef68
* Be a little more verbose when an error in trigerred in 'ap_set_file_slot()'Christophe Jaillet2019-06-131-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1861294 13f79535-47bb-0310-9956-ffa450edef68
* Follow up to r1847430.Christophe Jaillet2019-02-101-0/+1
| | | | | | | | - These flags are not for apr_dir_ function. Clarify comment. - Initialize 'depth', especially when AP_DIR_FLAG_RECURSIVE is explicitelly required. - Avoid an harmless over-allocation . git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1853302 13f79535-47bb-0310-9956-ffa450edef68
* core: Split out the ability to parse wildcard files and directoriesGraham Leggett2018-11-251-209/+21
| | | | | | | | from the Include/IncludeOptional directives into a generic set of functions ap_dir_nofnmatch() and ap_dir_fnmatch(). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1847430 13f79535-47bb-0310-9956-ffa450edef68
* Axe some dead code.Christophe Jaillet2018-05-241-1/+1
| | | | | | See PR 60086. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1832200 13f79535-47bb-0310-9956-ffa450edef68
* core: silently ignore a not existent file path when IncludeOptionalLuca Toscano2017-11-111-0/+15
| | | | | | | | | | | | | | is used. In https://bz.apache.org/bugzilla/show_bug.cgi?id=57585 some use cases were reported in which IncludeOptional seems to be too strict in its sanity checks. This change is a proposal to relax IncludeOptional checks to silently fail when a file path is not existent rather than returning SyntaxError. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1814968 13f79535-47bb-0310-9956-ffa450edef68
* config: follow up to r1809302.Yann Ylavic2017-09-221-12/+4
| | | | | | | | | Provide a convenient function to get module flags, and remove useless AP_MODULE_HAS_FLAGS checks in the core, core's version is at current MMN. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1809311 13f79535-47bb-0310-9956-ffa450edef68
* config: follow up to r1809302.Yann Ylavic2017-09-221-2/+8
| | | | | | | | We need to check that the module itself is at the right version. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1809305 13f79535-47bb-0310-9956-ffa450edef68
* config: allow to specify flags when registering modules.Yann Ylavic2017-09-221-7/+18
| | | | | | | | First one is AP_MODULE_FLAG_ALWAYS_MERGE. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1809302 13f79535-47bb-0310-9956-ffa450edef68
* ap_server_config_defines and ap_server_{pre,post}_read_config are arrays ofYann Ylavic2017-07-181-2/+2
| | | | | | | | *const* strings (must not change after being inserted), make it explicit. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1802309 13f79535-47bb-0310-9956-ffa450edef68
* Introduce request taint-checking concept.Nick Kew2017-04-211-0/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1792169 13f79535-47bb-0310-9956-ffa450edef68
* * server/config.c, include/http_config.h (ap_build_cont_config,Joe Orton2017-03-091-2/+2
| | | | | | | | | | ap_soak_end_container): Constify directive arguments - existing callers pass string literals. * server/core.c (start_cond_section): Remove casts needed for above. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1786120 13f79535-47bb-0310-9956-ffa450edef68
* Add <IfDirective> and <IfSection>:Joe Orton2017-03-091-0/+10
| | | | | | | | | | | | | | | | * 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
* Fix spelling in comments and text files.Rainer Jung2016-08-111-3/+3
| | | | | | | | No functional change. PR 59990 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756038 13f79535-47bb-0310-9956-ffa450edef68
* Add -DDUMP_INCLUDES configtest option to show the treeEric Covener2016-06-101-0/+62
| | | | | | | | | | | | | | | | | | | | | | | of Included configuration files. Example: Included configuration files: (*) .../conf/httpd.conf (517) .../conf/extra/proxy-html.conf (91) /dev/null Submitted By: Jacob Champion <champion.pxi gmail.com> Committed By: covener git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1747808 13f79535-47bb-0310-9956-ffa450edef68
* Rename ap_casecmpstr[n]() to ap_cstr_casecmp[n](), update with APR doxygenWilliam A. Rowe Jr2016-06-091-7/+7
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1747469 13f79535-47bb-0310-9956-ffa450edef68
* Save a few bytes in the conf pool.Christophe Jaillet2016-05-211-2/+12
| | | | | | | | The directive's names don't need to be duplicated in this pool when parsing the configuration file. Either they match a known directive name and we can use it directly if needed. Otherwise, it is still possible to make a copy afterwards. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1744980 13f79535-47bb-0310-9956-ffa450edef68
* mod_proxy, mod_ssl: Handle SSLProxy* directives in <Proxy> sections,Yann Ylavic2016-04-261-0/+5
| | | | | | | | allowing per backend TLS configuration. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1740928 13f79535-47bb-0310-9956-ffa450edef68
* Follow up to r1715876: core directives' tokens are ASCII.Yann Ylavic2015-12-301-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1722252 13f79535-47bb-0310-9956-ffa450edef68
* Follow up to r1715876: core directives are ASCII.Yann Ylavic2015-12-301-6/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1722251 13f79535-47bb-0310-9956-ffa450edef68
* Fix some minor style issue.Christophe Jaillet2015-12-101-7/+8
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1719190 13f79535-47bb-0310-9956-ffa450edef68
* Use 'apr_pstrmemdup' instead of 'apr_pstrndup' when applicable in order to ↵Christophe Jaillet2015-12-101-1/+1
| | | | | | save a few cycles. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1719189 13f79535-47bb-0310-9956-ffa450edef68
* Revert r1672014 - doesn't work as advertised (would break configsKaspar Brand2015-04-151-2/+1
| | | | | | | where the per-vhost log level is different from the global level) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1673838 13f79535-47bb-0310-9956-ffa450edef68
* UNSET the VirtualHost's LogLevel just before calling ap_merge_log_config(),Kaspar Brand2015-04-081-1/+2
| | | | | | | | | | | | | to make sure that the DEFAULT_LOGLEVEL (APLOG_WARNING) is also in effect when ap_process_config_tree() in main.c:main() walks through the VirtualHost sections. See https://mail-archives.apache.org/mod_mbox/httpd-dev/201404.mbox/%3C535CC85B.80501%40velox.ch%3E for one case this is addressing. This reverts the change from r1024427 on the one hand, but still ensures correct LogLevel merging on the other hand. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1672014 13f79535-47bb-0310-9956-ffa450edef68
* Save a few bytes in conf pool.Christophe Jaillet2015-02-191-1/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1660800 13f79535-47bb-0310-9956-ffa450edef68
* Provide a way for EXEC_ON_READ directives to see their contextEric Covener2015-01-301-3/+5
| | | | | | | | | | | | | | (parent directive). Usually, this context is not also EXEC_ON_READ so it's not fully processed, so e.g cmd->path is not fluffed up yet because the closing tag of the section is not read yet and ap_check_cmd_context() doesn't work) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1656058 13f79535-47bb-0310-9956-ffa450edef68
* Avoid useless warning message when parsing a section guarded by <IfDefine ↵Christophe Jaillet2014-08-181-4/+0
| | | | | | | | | foo> if $(foo) is used within the section. PR 56503 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1618541 13f79535-47bb-0310-9956-ffa450edef68
* Replace pre_htaccess hook with more flexible open_htaccess hookStefan Fritsch2013-07-021-18/+21
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1498880 13f79535-47bb-0310-9956-ffa450edef68
* factor out DEFAULT_HANDLER_NAMEEric Covener2013-06-261-7/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1496709 13f79535-47bb-0310-9956-ffa450edef68
* Use %pm available since apr 1.3 instead of an extra call to apr_strerrorStefan Fritsch2013-03-311-9/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1463056 13f79535-47bb-0310-9956-ffa450edef68
* Replace strdup by ap_malloc to ensure a proper error message if out-of-memory.Stefan Fritsch2012-12-251-3/+5
| | | | | | | | | While there, only allocate memory for the string part we actually use. PR: 54345 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1425771 13f79535-47bb-0310-9956-ffa450edef68
* Add minor 'Warning' directive as defined in current mod_macro.Fabien Coelho2012-12-081-0/+3
| | | | | | | | | | | * server/core.c: add 'Warning' directive by extending the 'Error' directive implementation. The 'Error' behavior is slightly changed so as to use verbose ap_log_error instead of returning the message. * docs/manual/mod/core.xml: add documentation for 'Warning'. * server/config.c: add comment about syntax vs configuration errors. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1418677 13f79535-47bb-0310-9956-ffa450edef68
* PR54223: 2.4 generates AH00554 when Include points to a directory with no ↵Eric Covener2012-11-291-1/+1
| | | | | | | | | | | | wildcard. r931435 refactored ap_process_resource_config() so it didn't read through directories, but also changed a path non-fnmatch directories are passed through to call ap_process_resource_config(). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1415023 13f79535-47bb-0310-9956-ffa450edef68
* "Iterate" directives: Report an error if no arguments are provided.Jeff Trawick2012-10-111-1/+9
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1397172 13f79535-47bb-0310-9956-ffa450edef68
* add pre_htaccess hook; in conjunction with earlier dirwalk_statJeff Trawick2012-09-241-0/+9
| | | | | | | | | and post_perdir_config hooks, this should allow mpm-itk to be used without patches to httpd core git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1389339 13f79535-47bb-0310-9956-ffa450edef68
* style in the neighborhood of a bugEric Covener2012-07-101-2/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1359881 13f79535-47bb-0310-9956-ffa450edef68
* Fold on Jeff's DefaultRuntimeDir impl... docs on the wayJim Jagielski2012-03-071-0/+20
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1297955 13f79535-47bb-0310-9956-ffa450edef68
* Core configuration: add AllowOverride option to treat syntaxNick Kew2012-01-091-7/+27
| | | | | | | | | errors in .htaccess as non-fatal. PR 52439 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1229021 13f79535-47bb-0310-9956-ffa450edef68
* Clean up size_t abuse, part 2. ap_malloc/calloc/realloc are explicitlyWilliam A. Rowe Jr2012-01-061-1/+1
| | | | | | | | | excluded from this cleanup as they must be signature identical to the clib functions, and although the definition of size_t has been flakey, the definition of those functions appears to be generally clean since ANSI C. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1228323 13f79535-47bb-0310-9956-ffa450edef68
* Limit length of lines in .htaccess to 8K again, to reduce DoS potential.Stefan Fritsch2011-12-121-3/+12
| | | | | | | Make ap_varbuf_cfg_getline() strictly enforce the max_len parameter. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1213338 13f79535-47bb-0310-9956-ffa450edef68
* Add some more log message tagsStefan Fritsch2011-12-041-6/+5
| | | | | | | | | | | | | Remove some log message tags from ap_log_* calls that log lots of different error messages, in particular the config parsing errors. Not sure how we should handle those. ssl_util.c: Downgrade some dynamic locking messages from level DEBUG to TRACE1-3 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1210252 13f79535-47bb-0310-9956-ffa450edef68
* Add lots of unique tags to error log messagesStefan Fritsch2011-12-021-13/+13
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209766 13f79535-47bb-0310-9956-ffa450edef68
* Cleanup effort in prep for GA push:Jim Jagielski2011-09-231-1/+1
| | | | | | | | Trim trailing whitespace... no func change git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174751 13f79535-47bb-0310-9956-ffa450edef68
* Add wrappers for malloc, calloc, realloc that check for out of memoryStefan Fritsch2011-09-191-2/+2
| | | | | | | | | | | | situations. Use them in most places where malloc, and friends are used. This results in clean error messages in an out of memory situation instead of segfaulting or silently malfunctioning. In some places, it just allows to remove some logging code. PR 51568, PR 51569, PR 51571. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1172686 13f79535-47bb-0310-9956-ffa450edef68
* Add ap_varbuf API for resizable buffers.Stefan Fritsch2011-08-131-18/+25
| | | | | | | | | | | | Increase length limit of lines in the configuration file to 16MB. Increase length limit of lines in the group file to 16MB. PR: 45888, 50824, 43084 Windows and Netware build changes are untested. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1157354 13f79535-47bb-0310-9956-ffa450edef68
* Adjust some messages for <If> blocks and remove some dead codeStefan Fritsch2011-08-031-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1153674 13f79535-47bb-0310-9956-ffa450edef68
* use temp pool for temp stringStefan Fritsch2011-08-031-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1153653 13f79535-47bb-0310-9956-ffa450edef68
* Add AllowOverrideList directive and documentationDaniel Ruggeri2011-07-271-3/+10
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1151654 13f79535-47bb-0310-9956-ffa450edef68