users@jersey.java.net

Re: webkit date format If-Modified-Since

From: brian walsh <brian_at_bwalsh.com>
Date: Tue, 14 Apr 2009 08:16:35 -0700

### Eclipse Workspace Patch 1.0
#P jersey
Index: jersey-core/src/main/java/com/sun/jersey/core/header/HttpDateFormat.java
===================================================================
--- jersey-core/src/main/java/com/sun/jersey/core/header/HttpDateFormat.java (revision
2245)
+++ jersey-core/src/main/java/com/sun/jersey/core/header/HttpDateFormat.java (working
copy)
@@ -69,7 +69,8 @@
     /**
      * The date format pattern for ANSI C asctime().
      */
- private static final String ANSI_C_ASCTIME_DATE_FORMAT_PATTERN =
"EEE MMM d HH:mm:ss yyyy";
+ private static final String ANSI_C_ASCTIME_DATE_FORMAT_PATTERN =
"EEE MMM dd HH:mm:ss yyyy zzz";


On Tue, Apr 14, 2009 at 8:14 AM, brian walsh <brian_at_bwalsh.com> wrote:
> We are getting the following date formats from safari clients
>
>     If-Modified-Since    Tue Apr 14 2009 05:58:52 GMT-0700 (PDT)
>
> This causes our application to return 200 when we expected 304.
>
> Tracing the code, it appears com.sun.jersey.core.header.HttpDateFormat
> contains the following...
>
>
>   /**
>     * The date format pattern for ANSI C asctime().
>     */
>    private static final String ANSI_C_ASCTIME_DATE_FORMAT_PATTERN =
> "EEE MMM d HH:mm:ss yyyy";
>
>
> Shouldn't it be ...
>
>   /**
>     * The date format pattern for ANSI C asctime().
>     */
>    private static final String ANSI_C_ASCTIME_DATE_FORMAT_PATTERN =
> "EEE MMM dd HH:mm:ss yyyy zzz";
>