pages.xml expires attribute : invalid Expires HTTP header with french JVM default locale
----------------------------------------------------------------------------------------
Key: JBSEAM-4502
URL:
https://jira.jboss.org/jira/browse/JBSEAM-4502
Project: Seam
Issue Type: Bug
Components: JSF Integration
Affects Versions: 2.1.0.SP1
Reporter: Gonzalez Adrian
Hello, I'm using expires attribute in pages.xml :
<page view-id="/js/global.jspx" expires="846000">
<header name="Cache-control" value="max-age=864000"/>
</page>
I'm running with a French OS (default locale french).
When using firebug, I see the following HTTP header value :
Expires sam., 19 déc. 2009 13:06:38 CET
This syntax is invalid (
http://www.ietf.org/rfc/rfc0822.txt - section 5.1. SYNTAX).
Just changing the following line of code in Page.java) corrects the bug :
Change :
SimpleDateFormat format = new SimpleDateFormat(RFC_1123_DATE);
With :
SimpleDateFormat format = new SimpleDateFormat(RFC_1123_DATE, Locale.ENGLISH);
And produces the expected output :
Expires Sat, 19 Dec 2009 09:39:48 CET
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira