From a7a1b39e55ea87cba759a87d680f98a41c5f041f Mon Sep 17 00:00:00 2001 From: jensp Date: Mon, 17 Oct 2016 06:32:16 +0000 Subject: [PATCH] The date format for the expires HTTP header generated by DispatcherHelper dependent on the locale of the server on which CCM runs. This caused the creation of an invalid expires header on systems with an locale other than english. git-svn-id: https://svn.libreccm.org/ccm/trunk@4380 8810af33-2d31-482b-a856-94f89814c4df --- ccm-core/src/com/arsdigita/dispatcher/DispatcherHelper.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ccm-core/src/com/arsdigita/dispatcher/DispatcherHelper.java b/ccm-core/src/com/arsdigita/dispatcher/DispatcherHelper.java index cf3ab51f5..fa21112e2 100755 --- a/ccm-core/src/com/arsdigita/dispatcher/DispatcherHelper.java +++ b/ccm-core/src/com/arsdigita/dispatcher/DispatcherHelper.java @@ -38,6 +38,7 @@ import java.util.Enumeration; import java.util.Locale; import java.util.Set; import java.util.TimeZone; +import java.util.Locale; import javax.mail.MessagingException; import javax.servlet.RequestDispatcher; @@ -78,7 +79,8 @@ public final class DispatcherHelper implements DispatcherConstants { return; } - rfc1123_formatter = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z"); + rfc1123_formatter = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", + Locale.ROOT); rfc1123_formatter.setTimeZone(TimeZone.getTimeZone("GMT")); // set the defaults