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

ResponseBuilder.lastModified does not format the date correctly

    XMLWordPrintable

Details

    Description

      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()));

      Attachments

        Issue Links

          Activity

            People

              patriot1burke@gmail.com Bill Burke (Inactive)
              sjurba_jira Sjur Bakka (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: