Details
Description
In our class:
icefaces/core/src/main/java/org/icefaces/impl/util/Util.java, to
We set up a static DateFormat:
public static final DateFormat HTTP_DATE = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz");
However, if the default is something other than English, a parsing exception can occur. The forum poster points to the relevant W3C spec:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html
and suggests making the following adjustment.
public static final DateFormat HTTP_DATE = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.ENGLISH);
icefaces/core/src/main/java/org/icefaces/impl/util/Util.java, to
We set up a static DateFormat:
public static final DateFormat HTTP_DATE = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz");
However, if the default is something other than English, a parsing exception can occur. The forum poster points to the relevant W3C spec:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html
and suggests making the following adjustment.
public static final DateFormat HTTP_DATE = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.ENGLISH);
Issue Links
- is duplicated by
-
ICE-6186 Compat resource servlet fail to parse modified header
- Closed
I tried adding the fix but now I get a
10:28:31,192 WARNING [com.icesoft.faces.webapp.CompatResourceServlet] failed to parse date: ti, 09 marras 2010 09:51:29 EET: java.text.ParseException: Unparseable date: "ti, 09 marras 2010 09:51:29 EET"
at java.text.DateFormat.parse(DateFormat.java:337) [:1.6.0_20]
at com.icesoft.faces.webapp.CompatResourceServlet.service(CompatResourceServlet.java:61) [:]
Strangely enough, before the fix the stuff it was trying to parse was in English.
This is annoying since I sometimes have resources denied (broken icons etc for compat-components) which I suspect is tracked to this issue (even if the parsing exception appears to be caught and log-warn-handled)