You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2017/05/04 20:44:25 UTC
svn commit: r1793901 - in /tomcat/trunk:
java/org/apache/catalina/filters/ExpiresFilter.java
webapps/docs/changelog.xml
Author: markt
Date: Thu May 4 20:44:25 2017
New Revision: 1793901
URL: http://svn.apache.org/viewvc?rev=1793901&view=rev
Log:
Within the Expires filter, make the content type value specified with the ExpiresByType parameter, case insensitive.
Modified:
tomcat/trunk/java/org/apache/catalina/filters/ExpiresFilter.java
tomcat/trunk/webapps/docs/changelog.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=1793901&r1=1793900&r2=1793901&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/filters/ExpiresFilter.java (original)
+++ tomcat/trunk/java/org/apache/catalina/filters/ExpiresFilter.java Thu May 4 20:44:25 2017
@@ -1267,6 +1267,9 @@ public class ExpiresFilter extends Filte
*/
protected Date getExpirationDate(XHttpServletResponse response) {
String contentType = response.getContentType();
+ if (contentType != null) {
+ contentType = contentType.toLowerCase(Locale.ENGLISH);
+ }
// lookup exact content-type match (e.g.
// "text/html; charset=iso-8859-1")
@@ -1396,7 +1399,7 @@ public class ExpiresFilter extends Filte
try {
if (name.startsWith(PARAMETER_EXPIRES_BY_TYPE)) {
String contentType = name.substring(
- PARAMETER_EXPIRES_BY_TYPE.length()).trim();
+ PARAMETER_EXPIRES_BY_TYPE.length()).trim().toLowerCase(Locale.ENGLISH);
ExpiresConfiguration expiresConfiguration = parseExpiresConfiguration(value);
this.expiresConfigurationByContentType.put(contentType,
expiresConfiguration);
Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1793901&r1=1793900&r2=1793901&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Thu May 4 20:44:25 2017
@@ -118,6 +118,10 @@
<code>useBodyEncodingForURI</code> attribute of the
<code>Connector</code> is correctly taken into account. (markt)
</fix>
+ <fix>
+ Within the Expires filter, make the content type value specified with the
+ <code>ExpiresByType</code> parameter, case insensitive. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org