Uploaded image for project: '[Read Only] - Hippo Site Toolkit 2'
  1. [Read Only] - Hippo Site Toolkit 2
  2. HSTTWO-1821

AbstractHstResponseState#setDateHeader sets dates as timestamp instead of in a GMT formatted style

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • 2.22.05, 2.23.03
    • 2.22.06, 2.23.04
    • None
    • None

    Description

      Date HTTP headers must be set this way (and not in timestamp):

      Expires: Thu, 01 Dec 1994 16:00:00 GMT

      Below is how Tomcat 6 implements the HttpServletResponse#setDateHeader method:

      DateFormat dateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US);
      dateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
      setHeader(name, dateFormat.format(new Date(date));

      Attachments

        Activity

          People

            jsheriff Junaidh Kadhar Sheriff
            mtricot Mickaƫl Tricot (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: