Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-1299

ResponseBuilder.lastModified does not format the date correctly [CLONE of RESTEASY-222]

XMLWordPrintable

    • Pull Request merged.

      When using the ResponseBuilder.lastModified method, the Last-Modified header is formated like this:
      Thu Mar 26 09:28:26 CET 2009

      This is not a correctly formatted HTTP date, thus is not parsable when it is returned by the browser in the If-Modified-Since header.
      It seems like the date is not formatted by the org.jboss.resteasy.util.DateUtil but is simply produced by calling Date.toString().

      A workaround to this problem is to use the ResponseBuilder.header method and format the date:
      builder.header("Last-Modified", DateUtil.formatDate(new Date()));

              rsigal@redhat.com Ronald Sigal
              mihxil Michiel Meeuwissen (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: