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

ResourceHandler calculates wrong EXPIRES header

XMLWordPrintable

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

                  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.

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

                Created:
                Updated:
                Resolved: