http_config.h

Checkout Tools
  • last updated 3 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Define ap_method_mask_t (typedef for apr_uint64_t) and use for method

bitmasks rather than apr_int64_t. Fixes UBSan errors shifting to the

top bit of a signed integer.

* include/httpd.h: Add ap_method_mask_t, use it for AP_METHOD_BIT.

(struct ap_method_mask_t): Likewise for method_mask field.

(struct request_rec): Likewise for allowed field.

* include/http_config.h (struct cmd_parms): Likewise for limited field.

* include/ap_mmn.h: Bump MMN major.

* modules/*/*.c: Adjust all method masks to use ap_method_mask_t.

  1. … 8 more files in changeset.
Fix spelling errors found by codespell. [skip ci]

  1. … 100 more files in changeset.
core: Split out the ability to parse wildcard files and directories

from the Include/IncludeOptional directives into a generic set of

functions ap_dir_nofnmatch() and ap_dir_fnmatch().

  1. … 5 more files in changeset.
Define "state directory" for storing persistent child-writable state,

with default from config.layout, configurable via DefaultStateDir.

* server/core.c (set_state_dir, ap_state_dir_relative):

New functions.

* config.layout, acinclude.m4, Makefile.in, configure.in: Define

statedir variables, drop davlockdb.

* include/ap_config_layout.h.in: Define DEFAULT_REL_STATEDIR,

DEFAULT_EXP_STATEDIR in place of _DAVLOCKDB.

* include/ap_mmn.h: Bump MMN minor.

  1. … 7 more files in changeset.
Fix some typos reported in PR 59998

Most add already been fixed when PR 59990 had been applied on trunk.

Thx klemens

  1. … 15 more files in changeset.
Follow up to r1740928: including NOT_IN_PROXY in NOT_IN_DIR_LOC_FILE is both

incomplete and not backportable, fix it by introducing NOT_IN_DIR_CONTEXT and

restoring NOT_IN_DIR_LOC_FILE to its previous value.

Per ap_check_cmd_context(), NOT_IN_DIR_LOC_FILE actually/really means "not in

any directory context", while the definition itself does not include all the

existing directory contexts (e.g. <Limit>, or <Proxy> before r1740928).

This is a bit of a misnomer, at least, so instead of (ab)using it by adding the

missing contexts (in an incompatible way), let's define NOT_IN_DIR_CONTEXT to

really exclude all directory context (i.e. NOT_IN_DIR_LOC_FILE + NOT_IN_LIMIT +

NOT_IN_PROXY) and use it wherever NOT_IN_DIR_LOC_FILE was used.

This is by itself a major MMN bump (modules not compiled with this commit and

having directives checked against NOT_IN_DIR_LOC_FILE won't be caught the same

way by NOT_IN_DIR_CONTEXT in the new ap_check_cmd_context() code), but with the

below change, 2.4.x should work as before:

- if ((forbidden & NOT_IN_DIR_CONTEXT) == NOT_IN_DIR_CONTEXT) {

+ if ((forbidden & NOT_IN_DIR_LOC_FILE) == NOT_IN_DIR_LOC_FILE) {

if (cmd->path != NULL) {

return apr_pstrcat(cmd->pool, cmd->cmd->name, gt,

- " cannot occur within directory context", NULL);

+ " cannot occur within <Directory/Location/Files/Proxy> "

+ "section", NULL);

}

...

}

  1. … 7 more files in changeset.
config: follow up to r1809302.

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.

  1. … 2 more files in changeset.
config: follow up to r1809302.

We need to check that the module itself is at the right version.

  1. … 1 more file in changeset.
config: allow to specify flags when registering modules.

First one is AP_MODULE_FLAG_ALWAYS_MERGE.

  1. … 2 more files in changeset.
* server/config.c, include/http_config.h (ap_build_cont_config,

ap_soak_end_container): Constify directive arguments - existing

callers pass string literals.

* server/core.c (start_cond_section): Remove casts needed for above.

  1. … 2 more files in changeset.
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.

  1. … 5 more files in changeset.
http_config: follow up to r1702948: maybe unused, yet maybe usefull too.
Fix spelling in comments and text files.

No functional change.

PR 59990

  1. … 69 more files in changeset.
mod_proxy, mod_ssl: Handle SSLProxy* directives in <Proxy> sections,

allowing per backend TLS configuration.

  1. … 19 more files in changeset.
httpd compiles warning free on gcc and every new warning will be treated as an error, standard c-89 is enforced
  1. … 5 more files in changeset.
expand comment

Provide a way for EXEC_ON_READ directives to see their context

(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)

  1. … 2 more files in changeset.
AP_INIT_NO_ARGS mishandled in macro

Submitted by: Joachim Zobel <jzobel heute-morgen.de>, covener

Committed by: covener

  1. … 1 more file in changeset.
doxygen improvements
  1. … 3 more files in changeset.
fix a couple of grammar problems

Replace pre_htaccess hook with more flexible open_htaccess hook

  1. … 4 more files in changeset.
Make ap_check_cmd_context() treat <If> sections like <File> sections.

This is necessary to properly disallow directives that don't work in

<If>.

A separate NOT_IN_IF flag may be nicer, but would create much more

hassle when being backported to 2.4.

  1. … 2 more files in changeset.
add pre_htaccess hook; in conjunction with earlier dirwalk_stat

and post_perdir_config hooks, this should allow mpm-itk to be

used without patches to httpd core

  1. … 2 more files in changeset.
Docs (and minor comment change) for DefaultRuntimeDir directive

  1. … 1 more file in changeset.
Fold on Jeff's DefaultRuntimeDir impl... docs on the way

  1. … 5 more files in changeset.
Core configuration: add AllowOverride option to treat syntax

errors in .htaccess as non-fatal.

PR 52439

  1. … 5 more files in changeset.
Clean up size_t abuse, part 2. ap_malloc/calloc/realloc are explicitly

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.

  1. … 10 more files in changeset.
Limit length of lines in .htaccess to 8K again, to reduce DoS potential.

Make ap_varbuf_cfg_getline() strictly enforce the max_len parameter.

  1. … 4 more files in changeset.
Consistenly use apr_file_* API instead of libc when dumping config because

mixing the two can give strange results due to buffering.

  1. … 2 more files in changeset.
cleanups related to new AllowOverrideList functionality:

- add new NOT_IN_HTACCESS flag for ap_check_cmd_context()

- describe the need for this in new_api_2_4.xml

- forbid Define and UnDefine in .htaccess

  1. … 5 more files in changeset.