From 9396b4ad1c49e7d2407e89933fec564fac2a3b4f Mon Sep 17 00:00:00 2001 From: Eric Covener Date: Wed, 2 Apr 2014 16:22:09 +0000 Subject: [PATCH] Merge r1584081 from trunk: provide an expression parser example that can control based on http status code, rather than just excluding locally generated errors. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1584082 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/mod/mod_headers.xml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/manual/mod/mod_headers.xml b/docs/manual/mod/mod_headers.xml index 0bb3b39a78..25be94e96a 100644 --- a/docs/manual/mod/mod_headers.xml +++ b/docs/manual/mod/mod_headers.xml @@ -186,6 +186,13 @@ Header merge Cache-Control no-store env=NO_STORE Header set Set-Cookie testcookie "expr=-z %{req:Cookie}" +
  • + Append a Caching header for responses with a HTTP status code of 200 + + Header append Cache-Control s-maxage=600 "expr=%{REQUEST_STATUS} == 200" + +
  • + @@ -343,9 +350,9 @@ Header merge Cache-Control no-store env=NO_STORE onsuccess condition. -

    It is not currently possible to limit an action to a range of HTTP - status codes, if the responses are successfully handled by e.g. CGI or - proxy modules.

    +

    Separately from the condition paramete described above, you + can limit an action based on HTTP status codes for e.g. proxied or CGI + requests. See the example that uses %{REQUEST_STATUS} in the section above.

    The action it performs is determined by the first argument (second argument if a condition is specified). -- 2.40.0