From: rjung Date: Mon, 11 Jul 2011 12:16:36 +0000 (+0000) Subject: Replace by in docs. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=f929a1231ff545a9d239562f7828a752f96c4db7;p=tomcat7.0 Replace by 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 --- 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.

@@ -181,7 +181,7 @@ be obtained from the source.

- To modify Cache-Control directives other than max-age (see + To modify 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 @@

- Basic configuration to add 'Expires' and 'Cache-Control: max-age=' + Basic configuration to add 'Expires' and 'Cache-Control: max-age=' headers to images, css and javascript.

@@ -226,7 +226,7 @@

- The ExpiresDefault and ExpiresByType directives can also be + The ExpiresDefault and ExpiresByType directives can also be defined in a more readable syntax of the form:

@@ -247,25 +247,25 @@ </init-param>

- where <base> is one of: + where <base> is one of:

    -
  • access
  • -
  • now (equivalent to 'access')
  • -
  • modification
  • +
  • access
  • +
  • now (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:

    -
  • years
  • -
  • months
  • -
  • weeks
  • -
  • days
  • -
  • hours
  • -
  • minutes
  • -
  • seconds
  • +
  • years
  • +
  • months
  • +
  • weeks
  • +
  • days
  • +
  • hours
  • +
  • minutes
  • +
  • seconds
For example, any of the following directives can be used to make documents expire 1 month after being accessed, by default: @@ -289,7 +289,7 @@

The expiry time can be fine-tuned by adding several ' -<num> <type>' clauses: +<num> <type>' clauses:

@@ -304,7 +304,7 @@ The expiry time can be fine-tuned by adding several ' </init-param>

- Note that if you use a modification date based setting, the Expires + Note that if you use a modification date based setting, the 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 '

- A response is eligible to be enriched by ExpiresFilter if : + A response is eligible to be enriched by ExpiresFilter if :

    -
  1. no expiration header is defined (Expires header or the - max-age directive of the Cache-Control header),
  2. +
  3. no expiration header is defined (Expires header or the + max-age directive of the Cache-Control header),
  4. the response status code is not excluded by the directive - ExpiresExcludedResponseStatusCodes,
  5. -
  6. the Content-Type of the response matches one of the types - defined the in ExpiresByType directives or the - ExpiresDefault directive is defined.
  7. + ExpiresExcludedResponseStatusCodes, +
  8. the 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.

@@ -336,17 +336,17 @@ The expiry time can be fine-tuned by adding several '

The expiration configuration if elected according to the following algorithm:

    -
  1. ExpiresByType matching the exact content-type returned by - HttpServletResponse.getContentType() possibly including the charset - (e.g. 'text/xml;charset=UTF-8'),
  2. -
  3. ExpiresByType matching the content-type without the charset if - HttpServletResponse.getContentType() contains a charset (e.g. ' - text/xml;charset=UTF-8' -> 'text/xml'),
  4. -
  5. ExpiresByType matching the major type (e.g. substring before - '/') of HttpServletResponse.getContentType() - (e.g. 'text/xml;charset=UTF-8' -> 'text +
  6. ExpiresByType matching the exact content-type returned by + HttpServletResponse.getContentType() possibly including the charset + (e.g. 'text/xml;charset=UTF-8'),
  7. +
  8. ExpiresByType matching the content-type without the charset if + HttpServletResponse.getContentType() contains a charset (e.g. ' + text/xml;charset=UTF-8' -> 'text/xml'),
  9. +
  10. ExpiresByType matching the major type (e.g. substring before + '/') of HttpServletResponse.getContentType() + (e.g. 'text/xml;charset=UTF-8' -> 'text '),
  11. -
  12. ExpiresDefault
  13. +
  14. ExpiresDefault

@@ -369,15 +369,15 @@ The expiry time can be fine-tuned by adding several '

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 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.

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 <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.

- The difference in effect is subtle. If M (modification in + The difference in effect is subtle. If 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 '

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, + '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.

@@ -447,7 +447,7 @@ The expiry time can be fine-tuned by adding several '

It overrides, for the specified MIME type only, any - expiration date set by the ExpiresDefault directive. + expiration date set by the ExpiresDefault directive.

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 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 '

To troubleshoot, enable logging on the - org.apache.catalina.filters.ExpiresFilter. + 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 ExpiresFilter adds an expiration date:

@@ -505,7 +505,7 @@ Mar 26, 2010 2:09:47 PM org.apache.catalina.filters.ExpiresFilter onBeforeWriteR FINE: Request "/tomcat.gif" with response status "200" content-type "image/gif", set expiration date 3/26/10 2:19 PM

- Sample of per-request log message where ExpiresFilter does not add + Sample of per-request log message where ExpiresFilter does not add an expiration date:

@@ -658,7 +658,7 @@ FINE: Request "/docs/config/manager.html" with response status "200" content-typ

- The filter will process the x-forwarded-for http header. + The filter will process the x-forwarded-for http header.

<filter> @@ -677,10 +677,10 @@ FINE: Request "/docs/config/manager.html" with response status "200" content-typ

- 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).

+ 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).

<filter> <filter-name>RemoteIpFilter</filter-name> @@ -736,17 +736,17 @@ FINE: Request "/docs/config/manager.html" with response status "200" content-typ 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 - request.header['x-forwarded-proto'] + request.header['x-forwarded-proto'] https https @@ -768,9 +768,9 @@ FINE: Request "/docs/config/manager.html" with response status "200" content-typ

- 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.

@@ -812,21 +812,21 @@ FINE: Request "/docs/config/manager.html" with response status "200" content-typ 140.211.11.130 - request.header['x-forwarded-for'] + request.header['x-forwarded-for'] 140.211.11.130, proxy1, proxy2 null - request.header['x-forwarded-by'] + request.header['x-forwarded-by'] null proxy1, proxy2

- 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.

@@ -867,23 +867,23 @@ FINE: Request "/docs/config/manager.html" with response status "200" content-typ 140.211.11.130 - request.header['x-forwarded-for'] + request.header['x-forwarded-for'] 140.211.11.130, proxy1, proxy2, 192.168.0.10 null - request.header['x-forwarded-by'] + request.header['x-forwarded-by'] null proxy1, proxy2

- 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.

@@ -925,24 +925,24 @@ FINE: Request "/docs/config/manager.html" with response status "200" content-typ untrusted-proxy - request.header['x-forwarded-for'] + request.header['x-forwarded-for'] 140.211.11.130, untrusted-proxy, proxy1 140.211.11.130 - request.header['x-forwarded-by'] + request.header['x-forwarded-by'] null 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. + 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.

diff --git a/webapps/docs/config/valve.xml b/webapps/docs/config/valve.xml index c32786d9a..15b4d2c3e 100644 --- a/webapps/docs/config/valve.xml +++ b/webapps/docs/config/valve.xml @@ -144,18 +144,18 @@

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.

@@ -165,14 +165,14 @@

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

diff --git a/webapps/docs/manager-howto.xml b/webapps/docs/manager-howto.xml index e2f3cd9e2..571b8ba5b 100644 --- a/webapps/docs/manager-howto.xml +++ b/webapps/docs/manager-howto.xml @@ -173,8 +173,8 @@ an example of restricting access to the localhost by IP address:

are not. To maintain the CSRF protection:

    -
  • users with the manager-gui role should not be granted either the - manager-script or manager-jmx roles.
  • +
  • users with the manager-gui role should not be granted either the + manager-script or manager-jmx roles.
  • if the text or jmx interfaces are accessed through a browser (e.g. for testing since these interfaces are intended for tools not humans) then the browser must be closed afterwards to terminate the session.