Author: kkolinko
Date: Wed Jun 20 14:08:52 2018
New Revision: 1833915
URL: http://svn.apache.org/viewvc?rev=1833915&view=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=62476
Use GMT timezone for the value of Expires header
Modified:
tomcat/trunk/java/org/apache/catalina/authenticator/AuthenticatorBase.java
tomcat/trunk/webapps/docs/changelog.xml
Modified:
tomcat/trunk/java/org/apache/catalina/authenticator/AuthenticatorBase.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/authenticator/AuthenticatorBase.java?rev=1833915&r1=1833914&r2=1833915&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/authenticator/AuthenticatorBase.java
(original)
+++ tomcat/trunk/java/org/apache/catalina/authenticator/AuthenticatorBase.java
Wed Jun 20 14:08:52 2018
@@ -25,6 +25,7 @@ import java.util.Locale;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
+import java.util.TimeZone;
import javax.security.auth.Subject;
import javax.security.auth.callback.CallbackHandler;
@@ -95,8 +96,12 @@ public abstract class AuthenticatorBase
/**
* "Expires" header always set to Date(1), so generate once only
*/
- private static final String DATE_ONE =
- (new SimpleDateFormat(FastHttpDateFormat.RFC1123_DATE,
Locale.US)).format(new Date(1));
+ private static final String DATE_ONE;
+ static {
+ SimpleDateFormat format = new
SimpleDateFormat(FastHttpDateFormat.RFC1123_DATE, Locale.US);
+ format.setTimeZone(TimeZone.getTimeZone("GMT"));
+ DATE_ONE = format.format(new Date(1));
+ }
/**
* The string manager for this package.
Modified: tomcat/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1833915&r1=1833914&r2=1833915&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Jun 20 14:08:52 2018
@@ -44,6 +44,17 @@
They eventually become mixed with the numbered issues. (I.e., numbered
issues do not "pop up" wrt. others).
-->
+<section name="Tomcat 9.0.10 (markt)" rtext="in development">
+ <subsection name="Catalina">
+ <changelog>
+ <fix>
+ <bug>62476</bug>: Use GMT timezone for the value of
+ <code>Expires</code> header as required by HTTP specification
+ (RFC 7231, 7234). (kkolinko)
+ </fix>
+ </changelog>
+ </subsection>
+</section>
<section name="Tomcat 9.0.9 (markt)" rtext="in development">
<subsection name="Catalina">
<changelog>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]