From df389cdeb1e36e8ebcc40c4d7183a067c56df60e Mon Sep 17 00:00:00 2001 From: Eric Covener Date: Wed, 2 Apr 2014 16:21:37 +0000 Subject: [PATCH] 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/trunk@1584081 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 bccb773c06..1561ce6881 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.50.1