hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rola...@apache.org
Subject svn commit: r548066 - in /jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http: protocol/HttpDateGenerator.java util/DateParseException.java util/DateUtils.java
Date Sun, 17 Jun 2007 16:51:56 GMT
Author: rolandw
Date: Sun Jun 17 09:51:55 2007
New Revision: 548066

URL: http://svn.apache.org/viewvc?view=rev&rev=548066
Log:
moved DateUtils/DateParseException from core to cookie (test cases to follow)

Removed:
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/util/DateParseException.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/util/DateUtils.java
Modified:
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/protocol/HttpDateGenerator.java

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/protocol/HttpDateGenerator.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/protocol/HttpDateGenerator.java?view=diff&rev=548066&r1=548065&r2=548066
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/protocol/HttpDateGenerator.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/protocol/HttpDateGenerator.java
Sun Jun 17 09:51:55 2007
@@ -35,8 +35,8 @@
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.Locale;
+import java.util.TimeZone;
 
-import org.apache.http.util.DateUtils;
 
 /**
  * Generates a date in the format required by the HTTP protocol.
@@ -49,6 +49,14 @@
  */
 public class HttpDateGenerator {
 
+    /** Date format pattern used to generate the header in RFC 1123 format. */
+    public static final
+        String PATTERN_RFC1123 = "EEE, dd MMM yyyy HH:mm:ss zzz";
+
+    /** The time zone to use in the date header. */
+    public static final TimeZone GMT = TimeZone.getTimeZone("GMT");
+
+
     private final DateFormat dateformat;
     
     private long dateAsLong = 0L;
@@ -56,8 +64,8 @@
 
     public HttpDateGenerator() {
         super();
-        this.dateformat = new SimpleDateFormat(DateUtils.PATTERN_RFC1123, Locale.US);
-        this.dateformat.setTimeZone(DateUtils.GMT);
+        this.dateformat = new SimpleDateFormat(PATTERN_RFC1123, Locale.US);
+        this.dateformat.setTimeZone(GMT);
     }
     
     public synchronized String getCurrentDate() {



Mime
View raw message