Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-544

ResourceHandler calculates wrong EXPIRES header

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 1.2.13.Final, 1.3.0.CR2
    • 1.3.0.CR1
    • None
    • None

    Description

                  exchange.getResponseHeaders().put(Headers.CACHE_CONTROL, "public, max-age=" + cacheTime);
                  long date = System.currentTimeMillis() + cacheTime;
                  String dateHeader = DateUtils.toDateString(new Date(date));
                  exchange.getResponseHeaders().put(Headers.EXPIRES, dateHeader);
      

      The max-age value is seconds, adding it to milliseconds is wrong. Any cacheable resource expires immediately on the client.

      Attachments

        Activity

          People

            sdouglas1@redhat.com Stuart Douglas
            christian.bauer_jira Christian Bauer (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: