From: Eric Covener Date: Wed, 2 Apr 2014 16:21:37 +0000 (+0000) Subject: provide an expression parser example that can control based on http status code, X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=295b8f8671ba266866d66c76feeaf809079255b5;p=thirdparty%2Fapache%2Fhttpd.git 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 --- diff --git a/docs/manual/mod/mod_headers.xml b/docs/manual/mod/mod_headers.xml index bccb773c06d..1561ce6881b 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).