Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 70139 invoked from network); 21 Jul 2010 16:38:57 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 21 Jul 2010 16:38:57 -0000 Received: (qmail 82766 invoked by uid 500); 21 Jul 2010 16:38:56 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 82529 invoked by uid 500); 21 Jul 2010 16:38:55 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 82520 invoked by uid 99); 21 Jul 2010 16:38:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Jul 2010 16:38:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Jul 2010 16:38:52 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B2E222388C8B; Wed, 21 Jul 2010 16:37:58 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r966304 - in /tomcat/trunk: java/org/apache/catalina/filters/ExpiresFilter.java test/org/apache/catalina/filters/TestExpiresFilter.java webapps/docs/changelog.xml webapps/docs/config/filter.xml Date: Wed, 21 Jul 2010 16:37:58 -0000 To: dev@tomcat.apache.org From: markt@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100721163758.B2E222388C8B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: markt Date: Wed Jul 21 16:37:58 2010 New Revision: 966304 URL: http://svn.apache.org/viewvc?rev=966304&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49617 Correct the ExpiresFilter documentation after changes to the submitted patch Modified: tomcat/trunk/java/org/apache/catalina/filters/ExpiresFilter.java tomcat/trunk/test/org/apache/catalina/filters/TestExpiresFilter.java tomcat/trunk/webapps/docs/changelog.xml tomcat/trunk/webapps/docs/config/filter.xml Modified: tomcat/trunk/java/org/apache/catalina/filters/ExpiresFilter.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/filters/ExpiresFilter.java?rev=966304&r1=966303&r2=966304&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/filters/ExpiresFilter.java (original) +++ tomcat/trunk/java/org/apache/catalina/filters/ExpiresFilter.java Wed Jul 21 16:37:58 2010 @@ -110,43 +110,7 @@ import org.apache.juli.logging.LogFactor * </web-app> * * - *

Configuration Parameters

- * ExpiresActive

- *

- * This directive enables or disables the generation of the Expires and - * Cache-Control headers by this ExpiresFilter. If set to - * Off, the headers will not be generated for any HTTP response. If set - * to On or true, the headers will be added to served HTTP - * responses according to the criteria defined by the - * ExpiresByType <content-type> and ExpiresDefault - * directives. Note that this directive does not guarantee that an - * Expires or Cache-Control header will be generated. If the - * criteria aren't met, no header will be sent, and the effect will be as - * though this directive wasn't even specified. - *

- *

- * This parameter is optional, default value is true. - *

- *

- * Enable filter - *

- * - *
- * <init-param>
- *    <!-- supports case insensitive 'On' or 'true' -->
- *    <param-name>ExpiresActive</param-name><param-value>On</param-value>
- * </init-param>
- * 
- *

- * Disable filter - *

- * - *
- * <init-param>
- *    <!-- supports anything different from case insensitive 'On' and 'true' -->
- *    <param-name>ExpiresActive</param-name><param-value>Off</param-value>
- * </init-param>
- * 
+ *

Configuration Parameters

* *

* ExpiresByType <content-type>

@@ -316,7 +280,7 @@ import org.apache.juli.logging.LogFactor * max-age directive of the Cache-Control header), *
  • the response status code is not excluded by the directive * ExpiresExcludedResponseStatusCodes,
  • - *
  • The Content-Type of the response matches one of the types + *
  • the Content-Type of the response matches one of the types * defined the in ExpiresByType directives or the * ExpiresDefault directive is defined.
  • * @@ -412,7 +376,6 @@ import org.apache.juli.logging.LogFactor *
      * Mar 26, 2010 2:01:41 PM org.apache.catalina.filters.ExpiresFilter init
      * FINE: Filter initialized with configuration ExpiresFilter[
    - *    active=true, 
      *    excludedResponseStatusCode=[304], 
      *    default=null, 
      *    byType={
    
    Modified: tomcat/trunk/test/org/apache/catalina/filters/TestExpiresFilter.java
    URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/filters/TestExpiresFilter.java?rev=966304&r1=966303&r2=966304&view=diff
    ==============================================================================
    --- tomcat/trunk/test/org/apache/catalina/filters/TestExpiresFilter.java (original)
    +++ tomcat/trunk/test/org/apache/catalina/filters/TestExpiresFilter.java Wed Jul 21 16:37:58 2010
    @@ -59,7 +59,6 @@ public class TestExpiresFilter extends T
                     "modification plus 5 hours 3 minutes");
             filterDef.addInitParameter("ExpiresByType image/jpg", "A10000");
             filterDef.addInitParameter("ExpiresByType video/mpeg", "M20000");
    -        filterDef.addInitParameter("ExpiresActive", "Off");
             filterDef.addInitParameter("ExpiresExcludedResponseStatusCodes",
                     "304, 503");
     
    
    Modified: tomcat/trunk/webapps/docs/changelog.xml
    URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=966304&r1=966303&r2=966304&view=diff
    ==============================================================================
    --- tomcat/trunk/webapps/docs/changelog.xml (original)
    +++ tomcat/trunk/webapps/docs/changelog.xml Wed Jul 21 16:37:58 2010
    @@ -66,8 +66,8 @@
             disabled by default. Based on a patch by Yair Lenga. (markt)
           
           
    -        48998: Add the ExpiresFilter, a port of the httpd mod_expires
    -        module. Patch provided by Cyrille Le Clerc. (markt)
    +        48998, 49617: Add the ExpiresFilter, a port of the
    +        httpd mod_expires module. Patch provided by Cyrille Le Clerc. (markt)
           
           
             49030: When initializing/starting/stopping connectors and
    
    Modified: tomcat/trunk/webapps/docs/config/filter.xml
    URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/filter.xml?rev=966304&r1=966303&r2=966304&view=diff
    ==============================================================================
    --- tomcat/trunk/webapps/docs/config/filter.xml (original)
    +++ tomcat/trunk/webapps/docs/config/filter.xml Wed Jul 21 16:37:58 2010
    @@ -319,7 +319,7 @@ The expiry time can be fine-tuned by add
         max-age directive of the Cache-Control header),
         
  • the response status code is not excluded by the directive ExpiresExcludedResponseStatusCodes,
  • -
  • The Content-Type of the response matches one of the types +
  • the Content-Type of the response matches one of the types defined the in ExpiresByType directives or the ExpiresDefault directive is defined.
  • @@ -446,8 +446,7 @@ The expiry time can be fine-tuned by add </init-param>

    - Note that this directive only has effect if ExpiresActive On has - been specified. It overrides, for the specified MIME type only, any + It overrides, for the specified MIME type only, any expiration date set by the ExpiresDefault directive.

    @@ -483,13 +482,12 @@ The expiry time can be fine-tuned by add org.apache.catalina.filters.ExpiresFilter.level = FINE

    - Sample of initialization log message : + Sample of initialization log message:

    Mar 26, 2010 2:01:41 PM org.apache.catalina.filters.ExpiresFilter init FINE: Filter initialized with configuration ExpiresFilter[ - active=true, excludedResponseStatusCode=[304], default=null, byType={ @@ -499,7 +497,7 @@ FINE: Filter initialized with configurat

    Sample of per-request log message where ExpiresFilter adds an - expiration date + expiration date:

    @@ -508,7 +506,7 @@ FINE: Request "/tomcat.gif" with respons

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

    --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org