Loading CHANGES +6 −0 Changes for CHANGES: 6 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -12,6 +12,12 @@ Changes with Apache 2.3.15 PR 51714. [Stefan Fritsch, Jim Jagielski, Ruediger Pluem, Eric Covener, <lowprio20 gmail.com>] *) mod_log_debug: Rename optional argument from if= to expr=, to be more in line with other config directives. [Stefan Fritsch] *) mod_headers: Require an expression to be specified with expr=, to be more in line with other config directives. [Stefan Fritsch] *) mod_substitute: To prevent overboarding memory usage, limit line length to 1MB. [Stefan Fritsch] Loading docs/manual/mod/mod_headers.xml +11 −11 Changes for docs/manual/mod/mod_headers.xml: 11 added lines, 11 removed lines. Original line number Diff line number Diff line Loading @@ -184,7 +184,7 @@ headers</description> <li> Set a test cookie if and only if the client didn't send us a cookie <example> Header set Set-Cookie testcookie !$req{Cookie} Header set Set-Cookie testcookie "expr=-z %{req:Cookie}" </example> </li> </ol> Loading Loading @@ -273,15 +273,15 @@ headers</description> <dl> <dt><code>early</code></dt> <dd>Specifies <a href="#early">early processing</a>.</dd> <dt><code>env=[!]varname</code></dt> <dt><code>env=[!]<var>varname</var></code></dt> <dd>The directive is applied if and only if the <a href="../env.html" >environment variable</a> <code>varname</code> exists. A <code>!</code> in front of <code>varname</code> reverses the test, so the directive applies only if <code>varname</code> is unset.</dd> <dt><code>expr</code></dt> <dd>An string that matches neither of the above is parsed as an expression. Details of expression syntax and evaluation are currently best documented on the <module>mod_filter</module> page.</dd> <dt><code>expr=<var>expression</var></code></dt> <dd>The directive is applied if and only if <var>expression</var> evaluates to true. Details of expression syntax and evaluation are documented in the <a href="../expr.html">ap_expr</a> documentation.</dd> </dl> <p>Except in <a href="#early">early</a> mode, the Loading Loading @@ -447,15 +447,15 @@ headers</description> <dl> <dt><code>early</code></dt> <dd>Specifies <a href="#early">early processing</a>.</dd> <dt><code>env=[!]varname</code></dt> <dt><code>env=[!]<var>varname</var></code></dt> <dd>The directive is applied if and only if the <a href="../env.html" >environment variable</a> <code>varname</code> exists. A <code>!</code> in front of <code>varname</code> reverses the test, so the directive applies only if <code>varname</code> is unset.</dd> <dt><code>expr</code></dt> <dd>An string that matches neither of the above is parsed as an expression. Details of expression syntax and evaluation are currently best documented on the <module>mod_filter</module> page.</dd> <dt><code>expr=<var>expression</var></code></dt> <dd>The directive is applied if and only if <var>expression</var> evaluates to true. Details of expression syntax and evaluation are documented in the <a href="../expr.html">ap_expr</a> documentation.</dd> </dl> <p>Except in <a href="#early">early</a> mode, the Loading docs/manual/mod/mod_log_config.xml +9 −7 Changes for docs/manual/mod/mod_log_config.xml: 9 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -388,7 +388,8 @@ <description>Sets filename and format of log file</description> <syntax>CustomLog <var>file</var>|<var>pipe</var> <var>format</var>|<var>nickname</var> [env=[!]<var>environment-variable</var>]</syntax> [env=[!]<var>environment-variable</var>| expr=<var>expression</var>]</syntax> <contextlist><context>server config</context><context>virtual host</context> </contextlist> Loading Loading @@ -445,12 +446,13 @@ </example> <p>The third argument is optional and controls whether or not to log a particular request based on the presence or absence of a particular variable in the server environment. If the specified <a href="../env.html">environment variable</a> is set for the request (or is not set, in the case of a '<code>env=!<var>name</var></code>' clause), then the request will be logged.</p> not to log a particular request. The condition can be the presence or absence (in the case of a '<code>env=!<var>name</var></code>' clause) of a particular variable in the server <a href="../env.html">environment</a>. Alternatively, the condition can be expressed as arbitrary boolean <a href="../expr.html" >expression</a>. If the condition is not satisfied, the request will not be logged.</p> <p>Environment variables can be set on a per-request basis using the <module>mod_setenvif</module> Loading docs/manual/mod/mod_log_debug.xml +4 −4 Changes for docs/manual/mod/mod_log_debug.xml: 4 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ Log message if request to /foo/* is processed in a sub-request: <example> <Location /foo/><br/> LogMessage "subrequest to /foo/" hook=type_checker if=%{IS_SUBREQ}<br/> LogMessage "subrequest to /foo/" hook=type_checker expr=%{IS_SUBREQ}<br/> </Location><br/> </example> Loading @@ -59,9 +59,9 @@ Log message if an IPv6 client causes a request timeout: <example> LogMessage "IPv6 timeout from %{REMOTE_ADDR}" "if=-T %{IPV6} && %{REQUEST_STATUS} = 408" "expr=-T %{IPV6} && %{REQUEST_STATUS} = 408" </example> Note the placing of the double quotes for the <code>if=</code> argument. Note the placing of the double quotes for the <code>expr=</code> argument. </li> <li> Loading @@ -85,7 +85,7 @@ <description>Log userdefined message to error log </description> <syntax>LogMessage <var>message</var> [hook=<var>hook</var>] [if=<var>expression</var>] [hook=<var>hook</var>] [expr=<var>expression</var>] </syntax> <default>Unset</default> <contextlist><context>directory</context> Loading modules/loggers/mod_log_debug.c +2 −2 Changes for modules/loggers/mod_log_debug.c: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -221,8 +221,8 @@ static const char *cmd_log_message(cmd_parms *cmd, void *dconf_, const char *arg return apr_psprintf(cmd->pool, "Invalid hook name: %s", name); } } else if (strncasecmp(args[i], "if=", 3) == 0) { const char *expr = args[i] + 3; else if (strncasecmp(args[i], "expr=", 5) == 0) { const char *expr = args[i] + 5; entry->condition = ap_expr_parse_cmd(cmd, expr, AP_EXPR_FLAG_DONT_VARY, &err, NULL); Loading Loading
CHANGES +6 −0 Changes for CHANGES: 6 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -12,6 +12,12 @@ Changes with Apache 2.3.15 PR 51714. [Stefan Fritsch, Jim Jagielski, Ruediger Pluem, Eric Covener, <lowprio20 gmail.com>] *) mod_log_debug: Rename optional argument from if= to expr=, to be more in line with other config directives. [Stefan Fritsch] *) mod_headers: Require an expression to be specified with expr=, to be more in line with other config directives. [Stefan Fritsch] *) mod_substitute: To prevent overboarding memory usage, limit line length to 1MB. [Stefan Fritsch] Loading
docs/manual/mod/mod_headers.xml +11 −11 Changes for docs/manual/mod/mod_headers.xml: 11 added lines, 11 removed lines. Original line number Diff line number Diff line Loading @@ -184,7 +184,7 @@ headers</description> <li> Set a test cookie if and only if the client didn't send us a cookie <example> Header set Set-Cookie testcookie !$req{Cookie} Header set Set-Cookie testcookie "expr=-z %{req:Cookie}" </example> </li> </ol> Loading Loading @@ -273,15 +273,15 @@ headers</description> <dl> <dt><code>early</code></dt> <dd>Specifies <a href="#early">early processing</a>.</dd> <dt><code>env=[!]varname</code></dt> <dt><code>env=[!]<var>varname</var></code></dt> <dd>The directive is applied if and only if the <a href="../env.html" >environment variable</a> <code>varname</code> exists. A <code>!</code> in front of <code>varname</code> reverses the test, so the directive applies only if <code>varname</code> is unset.</dd> <dt><code>expr</code></dt> <dd>An string that matches neither of the above is parsed as an expression. Details of expression syntax and evaluation are currently best documented on the <module>mod_filter</module> page.</dd> <dt><code>expr=<var>expression</var></code></dt> <dd>The directive is applied if and only if <var>expression</var> evaluates to true. Details of expression syntax and evaluation are documented in the <a href="../expr.html">ap_expr</a> documentation.</dd> </dl> <p>Except in <a href="#early">early</a> mode, the Loading Loading @@ -447,15 +447,15 @@ headers</description> <dl> <dt><code>early</code></dt> <dd>Specifies <a href="#early">early processing</a>.</dd> <dt><code>env=[!]varname</code></dt> <dt><code>env=[!]<var>varname</var></code></dt> <dd>The directive is applied if and only if the <a href="../env.html" >environment variable</a> <code>varname</code> exists. A <code>!</code> in front of <code>varname</code> reverses the test, so the directive applies only if <code>varname</code> is unset.</dd> <dt><code>expr</code></dt> <dd>An string that matches neither of the above is parsed as an expression. Details of expression syntax and evaluation are currently best documented on the <module>mod_filter</module> page.</dd> <dt><code>expr=<var>expression</var></code></dt> <dd>The directive is applied if and only if <var>expression</var> evaluates to true. Details of expression syntax and evaluation are documented in the <a href="../expr.html">ap_expr</a> documentation.</dd> </dl> <p>Except in <a href="#early">early</a> mode, the Loading
docs/manual/mod/mod_log_config.xml +9 −7 Changes for docs/manual/mod/mod_log_config.xml: 9 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -388,7 +388,8 @@ <description>Sets filename and format of log file</description> <syntax>CustomLog <var>file</var>|<var>pipe</var> <var>format</var>|<var>nickname</var> [env=[!]<var>environment-variable</var>]</syntax> [env=[!]<var>environment-variable</var>| expr=<var>expression</var>]</syntax> <contextlist><context>server config</context><context>virtual host</context> </contextlist> Loading Loading @@ -445,12 +446,13 @@ </example> <p>The third argument is optional and controls whether or not to log a particular request based on the presence or absence of a particular variable in the server environment. If the specified <a href="../env.html">environment variable</a> is set for the request (or is not set, in the case of a '<code>env=!<var>name</var></code>' clause), then the request will be logged.</p> not to log a particular request. The condition can be the presence or absence (in the case of a '<code>env=!<var>name</var></code>' clause) of a particular variable in the server <a href="../env.html">environment</a>. Alternatively, the condition can be expressed as arbitrary boolean <a href="../expr.html" >expression</a>. If the condition is not satisfied, the request will not be logged.</p> <p>Environment variables can be set on a per-request basis using the <module>mod_setenvif</module> Loading
docs/manual/mod/mod_log_debug.xml +4 −4 Changes for docs/manual/mod/mod_log_debug.xml: 4 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ Log message if request to /foo/* is processed in a sub-request: <example> <Location /foo/><br/> LogMessage "subrequest to /foo/" hook=type_checker if=%{IS_SUBREQ}<br/> LogMessage "subrequest to /foo/" hook=type_checker expr=%{IS_SUBREQ}<br/> </Location><br/> </example> Loading @@ -59,9 +59,9 @@ Log message if an IPv6 client causes a request timeout: <example> LogMessage "IPv6 timeout from %{REMOTE_ADDR}" "if=-T %{IPV6} && %{REQUEST_STATUS} = 408" "expr=-T %{IPV6} && %{REQUEST_STATUS} = 408" </example> Note the placing of the double quotes for the <code>if=</code> argument. Note the placing of the double quotes for the <code>expr=</code> argument. </li> <li> Loading @@ -85,7 +85,7 @@ <description>Log userdefined message to error log </description> <syntax>LogMessage <var>message</var> [hook=<var>hook</var>] [if=<var>expression</var>] [hook=<var>hook</var>] [expr=<var>expression</var>] </syntax> <default>Unset</default> <contextlist><context>directory</context> Loading
modules/loggers/mod_log_debug.c +2 −2 Changes for modules/loggers/mod_log_debug.c: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -221,8 +221,8 @@ static const char *cmd_log_message(cmd_parms *cmd, void *dconf_, const char *arg return apr_psprintf(cmd->pool, "Invalid hook name: %s", name); } } else if (strncasecmp(args[i], "if=", 3) == 0) { const char *expr = args[i] + 3; else if (strncasecmp(args[i], "expr=", 5) == 0) { const char *expr = args[i] + 5; entry->condition = ap_expr_parse_cmd(cmd, expr, AP_EXPR_FLAG_DONT_VARY, &err, NULL); Loading