From f929a1231ff545a9d239562f7828a752f96c4db7 Mon Sep 17 00:00:00 2001
From: rjung in docs. The physical markup was
only used in few places. Mostly we use the logical markup .
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1145137 13f79535-47bb-0310-9956-ffa450edef68
---
webapps/docs/config/filter.xml | 190 ++++++++++++++++++++---------------------
webapps/docs/config/valve.xml | 18 ++--
webapps/docs/manager-howto.xml | 4 +-
3 files changed, 106 insertions(+), 106 deletions(-)
diff --git a/webapps/docs/config/filter.xml b/webapps/docs/config/filter.xml
index 692ae434c..6865a7c54 100644
--- a/webapps/docs/config/filter.xml
+++ b/webapps/docs/config/filter.xml
@@ -167,8 +167,8 @@
ExpiresFilter is a Java Servlet API port of Apache
mod_expires.
- This filter controls the setting of the Expires HTTP header and the
- max-age directive of the Cache-Control HTTP header in
+ This filter controls the setting of the Expires HTTP header and the
+ max-age directive of the Cache-Control HTTP header in
server responses. The expiration date can set to be relative to either the
time the source file was last modified, or to the time of the client access.
- To modify Cache-Control directives other than max-age (see
+ To modify
- Basic configuration to add 'Expires' and 'Cache-Control: max-age='
+ Basic configuration to add '
- The ExpiresDefault and ExpiresByType directives can also be
+ The
- where <base> is one of:
+ where Cache-Control directives other than max-age (see
RFC
2616 section 14.9), you can use other servlet filters or Apache Httpd
@@ -192,7 +192,7 @@
Expires' and 'Cache-Control: max-age='
headers to images, css and javascript.
ExpiresDefault and ExpiresByType directives can also be
defined in a more readable syntax of the form:
<base> is one of:
-
accessnow (equivalent to 'access')modification
- The plus keyword is optional. <num> should be an
- integer value (acceptable to Integer.parseInt()), and
- <type> is one of:
+ The plus keyword is optional. <num> should be an
+ integer value (acceptable to Integer.parseInt()), and
+ <type> is one of:
yearsmonthsweeksdayshoursminutesseconds
The expiry time can be fine-tuned by adding several '
-<num> <type>' clauses:
+<num> <type>' clauses:
- Note that if you use a modification date based setting, the Expires
+ Note that if you use a modification date based setting, the
- A response is eligible to be enriched by ExpiresFilter if :
+ A response is eligible to be enriched by Expires
header will not be added to content that does not come from
a file on disk. This is due to the fact that there is no modification time
for such content.
@@ -313,21 +313,21 @@ The expiry time can be fine-tuned by adding several '
ExpiresFilter if :
-
Expires header or the
+ max-age directive of the Cache-Control header),ExpiresExcludedResponseStatusCodes,
+ Content-Type of the response matches one of the types
+ defined the in ExpiresByType directives or the
+ ExpiresDefault directive is defined.
- Note : If Cache-Control header contains other directives than
- max-age, they are concatenated with the max-age directive
- that is added by the ExpiresFilter.
+ Note : If Cache-Control header contains other directives than
+ max-age, they are concatenated with the max-age directive
+ that is added by the ExpiresFilter.
The expiration configuration if elected according to the following algorithm:
ExpiresByType matching the exact content-type returned by
+ HttpServletResponse.getContentType() possibly including the charset
+ (e.g. 'text/xml;charset=UTF-8'),ExpiresByType matching the content-type without the charset if
+ HttpServletResponse.getContentType() contains a charset (e.g. '
+ text/xml;charset=UTF-8' -> 'text/xml'),ExpiresByType matching the major type (e.g. substring before
+ '/') of HttpServletResponse.getContentType()
+ (e.g. 'text/xml;charset=UTF-8' -> 'text
'),ExpiresDefault
This directive defines the http response status codes for which the
- ExpiresFilter will not generate expiration headers. By default, the
- 304 status code ("Not modified") is skipped. The
+ ExpiresFilter will not generate expiration headers. By default, the
+ 304 status code ("Not modified") is skipped. The
value is a comma separated list of http status codes.
- This directive is useful to ease usage of ExpiresDefault directive.
- Indeed, the behavior of 304 Not modified (which does specify a
- Content-Type header) combined with Expires and
- Cache-Control:max-age= headers can be unnecessarily tricky to
+ This directive is useful to ease usage of ExpiresDefault directive.
+ Indeed, the behavior of 304 Not modified (which does specify a
+ Content-Type header) combined with Expires and
+ Cache-Control:max-age= headers can be unnecessarily tricky to
understand.
@@ -394,29 +394,29 @@ The expiry time can be fine-tuned by adding several '
- This directive defines the value of the Expires header and the
- max-age directive of the Cache-Control header generated for
- documents of the specified type (e.g., text/html). The second
+ This directive defines the value of the
The base time is either the last modification time of the file, or the time
of the client's access to the document. Which should be used is
- specified by the <code> field; M means that the
+ specified by the
- The difference in effect is subtle. If M (modification in
+ The difference in effect is subtle. If
Note: When the content type includes a charset (e.g.
- 'ExpiresByType text/xml;charset=utf-8'), Tomcat removes blank chars
- between the ';' and the 'charset' keyword. Due to this,
+
It overrides, for the specified MIME type only, any
- expiration date set by the ExpiresDefault directive.
+ expiration date set by the
You can also specify the expiration time calculation using an alternate
@@ -459,7 +459,7 @@ The expiry time can be fine-tuned by adding several '
This directive sets the default algorithm for calculating the
expiration time for all documents in the affected realm. It can be
- overridden on a type-by-type basis by the ExpiresByType directive. See the
+ overridden on a type-by-type basis by the
To troubleshoot, enable logging on the
- org.apache.catalina.filters.ExpiresFilter.
+
Extract of logging.properties
@@ -496,7 +496,7 @@ FINE: Filter initialized with configuration ExpiresFilter[
text/javascript=ExpiresConfiguration[startingPoint=ACCESS_TIME, duration=[10 MINUTE]]}]
- Sample of per-request log message where ExpiresFilter adds an
+ Sample of per-request log message where
- Sample of per-request log message where ExpiresFilter does not add
+ Sample of per-request log message where
- The filter will process the x-forwarded-for http header.
+ The filter will process the
- The filter will process x-forwarded-for and
- x-forwarded-proto http headers. Expected value for the
- x-forwarded-proto header in case of SSL connections is
- https (case insensitive). Expires header and the
+ max-age directive of the Cache-Control header generated for
+ documents of the specified type (e.g., text/html). The second
argument sets the number of seconds that will be added to a base time to
- construct the expiration date. The Cache-Control: max-age is
+ construct the expiration date. The Cache-Control: max-age is
calculated by subtracting the request time from the expiration date and
expressing the result in seconds.
<code> field; M means that the
file's last modification time should be used as the base time, and
- A means the client's access time should be used. The duration
- is expressed in seconds. A2592000 stands for
- access plus 30 days in alternate syntax.
+ A means the client's access time should be used. The duration
+ is expressed in seconds. A2592000 stands for
+ access plus 30 days in alternate syntax.
M (modification in
alternate syntax) is used, all current copies of the document in all caches
will expire at the same time, which can be good for something like a weekly
- notice that's always found at the same URL. If A (
- access or now in alternate syntax) is used, the date of
+ notice that's always found at the same URL. If A (
+ access or now in alternate syntax) is used, the date of
expiration is different for each client; this can be good for image files
that don't change very often, particularly for a set of related
documents that all refer to the same images (i.e., the images will be
@@ -424,8 +424,8 @@ The expiry time can be fine-tuned by adding several '
'ExpiresByType text/xml;charset=utf-8'), Tomcat removes blank chars
+ between the ';' and the 'charset' keyword. Due to this,
configuration of an expiration with a charset must not include
such a space character.
ExpiresDefault directive.
ExpiresByType directive. See the
description of that directive for details about the syntax of the
argument, and the "alternate syntax"
description as well.
@@ -472,7 +472,7 @@ The expiry time can be fine-tuned by adding several '
org.apache.catalina.filters.ExpiresFilter.
ExpiresFilter adds an
expiration date:
ExpiresFilter does not add
an expiration date:
x-forwarded-for http header.
x-forwarded-for and
+ x-forwarded-proto http headers. Expected value for the
+ x-forwarded-proto header in case of SSL connections is
+ https (case insensitive). 140.211.11.130
-
request.header['x-forwarded-for']
+ request.header
['x-forwarded-for'] 140.211.11.130, 192.168.0.10
null
-
request.header['x-forwarded-by']
+ request.header
['x-forwarded-by'] null
null
-
@@ -768,9 +768,9 @@ FINE: Request "/docs/config/manager.html" with response status "200" content-typ
request.header['x-forwarded-proto']
+ request.header
['x-forwarded-proto'] https
https
- Note : x-forwarded-by header is null because only
+ Note : x-forwarded-by header is null because only
internal proxies has been traversed by the request.
- x-forwarded-for is null because all the proxies are
+ x-forwarded-for is null because all the proxies are
trusted or internal.
['x-forwarded-for'] ['x-forwarded-by']
- Note : proxy1 and proxy2 are both trusted proxies that
- come in x-forwarded-for header, they both are migrated in
- x-forwarded-by header. x-forwarded-for is null
+ Note : proxy1 and proxy2 are both trusted proxies that
+ come in x-forwarded-for header, they both are migrated in
+ x-forwarded-by header. x-forwarded-for is null
because all the proxies are trusted or internal.
['x-forwarded-for'] ['x-forwarded-by']
- Note : proxy1 and proxy2 are both trusted proxies that
- come in x-forwarded-for header, they both are migrated in
- x-forwarded-by header. As 192.168.0.10 is an internal
- proxy, it does not appear in x-forwarded-by.
- x-forwarded-for is null because all the proxies are
+ Note : proxy1 and proxy2 are both trusted proxies that
+ come in x-forwarded-for header, they both are migrated in
+ x-forwarded-by header. As 192.168.0.10 is an internal
+ proxy, it does not appear in x-forwarded-by.
+ x-forwarded-for is null because all the proxies are
trusted or internal.
['x-forwarded-for'] ['x-forwarded-by']
- Note : x-forwarded-by holds the trusted proxy proxy1.
- x-forwarded-by holds 140.211.11.130 because
- untrusted-proxy is not trusted and thus, we can not trust that
- untrusted-proxy is the actual remote ip.
- request.remoteAddr is untrusted-proxy that is an IP
- verified by proxy1.
+ Note : x-forwarded-by holds the trusted proxy proxy1.
+ x-forwarded-by holds 140.211.11.130 because
+ untrusted-proxy is not trusted and thus, we can not trust that
+ untrusted-proxy is the actual remote ip.
+ request.remoteAddr is untrusted-proxy that is an IP
+ verified by proxy1.
Flag to determine if log rotation should occur.
- If set to false, then this file is never rotated and
- fileDateFormat is ignored. Use with caution!
- Default value: true
+ If set to false, then this file is never rotated and
+ fileDateFormat is ignored. Use with caution!
+ Default value: true
Turns on conditional logging. If set, requests will be
- logged only if ServletRequest.getAttribute() is
+ logged only if ServletRequest.getAttribute() is
null. For example, if this value is set to
- junk, then a particular request will only be logged
- if ServletRequest.getAttribute("junk") == null.
+ junk, then a particular request will only be logged
+ if ServletRequest.getAttribute("junk") == null.
The use of Filters is an easy way to set/unset the attribute
in the ServletRequest on many different requests.
Allows a customized date format in the access log file name.
The date format also decides how often the file is rotated.
If you wish to rotate every hour, then set this value
- to: yyyy-MM-dd.HH
+ to: yyyy-MM-dd.HH
Flag to determine if logging will be buffered.
- If set to false, then access logging will be written after each
- request. Default value: true
+ If set to false, then access logging will be written after each
+ request. Default value: true
manager-gui role should not be granted either the
+ manager-script or manager-jmx roles.