mod_setenvif.c

Checkout Tools
  • last updated 3 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
mod_setenvif: add "early mode"

Primarily to run before `RequestHeader ... ... early`

  1. … 2 more files in changeset.
* We can have expressions that become true if a regex pattern in the expression

does NOT match. In this case val is NULL and we should just set the value for

the environment variable like in the pattern case.

hostname: Test and log useragent_host per-request across various modules,

including the scoreboard, expression and rewrite engines, setenvif,

authz_host, access_compat, custom logging, ssl and REMOTE_HOST variables.

PR55348 [William Rowe]

This is the complete change set which applies cleanly to 2.4.x as well,

the server/scoreboard.c will follow, which does not apply due to drift.

  1. … 9 more files in changeset.
s/\<\(\w\+\)\>\s\+\<\1\>/\1/g
  1. … 14 more files in changeset.
* Fix null pointer dereference in case SetEnvif and SetEnvIfExpr are used

together.

PR: 54881

  1. … 1 more file in changeset.
Compile the regex used by is_header_regex() only once during startup

This should save some memory, especially with .htaccess

Further clarify the naming of the entity that originates the request by

calling that entity a useragent instead of a client.

  1. … 14 more files in changeset.
Add lots of unique tags to error log messages

  1. … 172 more files in changeset.
Introduce a per connection "peer_ip" and a per request "client_ip" to

distinguish between the raw IP address of the connection and the effective

IP address of the request.

  1. … 23 more files in changeset.
Introduce a per request version of the remote IP address, which can be

optionally modified by a module when the effective IP of the client

is not the same as the real IP of the client (such as a load balancer).

  1. … 17 more files in changeset.
More ap_pregsub error checking/logging

Remove OID match which was never in a GA releas and is obsoleted by

SetEnvIfExpr with PeerExtList()

  1. … 3 more files in changeset.
Add string valued expressions to ap_expr, do some API cleanup

- add possibility to have expressions that evaluate to a string and not to

a boolean value

- modify ap_expr_parse_cmd() interface to support this and make it more

convenient to use in general

- rename AP_EXPR_FLAGS_* to AP_EXPR_FLAG_* for consistency

  1. … 14 more files in changeset.
fix some dead assignments found by the clang analyzer

  1. … 11 more files in changeset.
Fix segfault for loglevel >= trace2

Rename ap_expr's typedef names:

ap_expr -> ap_expr_t

ap_expr_parse_ctx -> ap_expr_parse_ctx_t

ap_expr_eval_ctx -> ap_expr_eval_ctx_t

ap_expr_lookup_fn -> ap_expr_lookup_fn_t

ap_expr_node_op -> ap_expr_node_op_e

  1. … 10 more files in changeset.
Fix SetEnvIfExpr to work with expressions that do not set the regexp

reference data.

Add some trace logging.

Fix segfault on parse error

More ap_expr updates:

- minor bump for ap_expr_exec_re() introduced in r1037504

- actually commit the changes to allow using backreferences in SetEnvIfExpr

- automatically add the correct entries to the Vary-header if the result of

an expression evaluation depends on a request header

(can be turned off by setting the AP_EXPR_FLAGS_DONT_VARY flag)

- set AP_EXPR_FLAGS_DONT_VARY in mod_log_config's conditional logging

- fix various off-by-one errors in req_table_func

  1. … 4 more files in changeset.
Add SetEnvIfExpr directive to set env var depending on expression.

  1. … 1 more file in changeset.
use temp_pool for some temporary regexps

Use the new APLOG_USE_MODULE/AP_DECLARE_MODULE macros everywhere to take

advantage of per-module loglevels

  1. … 169 more files in changeset.
odd assortment of spelling fixes

  1. … 7 more files in changeset.
update license header text
  1. … 316 more files in changeset.
Update the copyright year in all .c, .h and .xml files

  1. … 497 more files in changeset.
No functional change: remove "internal" tab spacing/formatting.

  1. … 32 more files in changeset.
No functional Change: Removing trailing whitespace. This also

means that "blank" lines consisting of just spaces or

tabs are now really blank lines

  1. … 180 more files in changeset.
No functional change: simple detabbing of indented code.

  1. … 72 more files in changeset.
C++ comments are not supported by some compilers (ReliantUnix).

Catch up with the changes to mod_ssl and rename the

function pointer to reflect the change. With this change

this module now builds again.