Uploaded image for project: 'appNG'
  1. appNG
  2. APPNG-2303

Possible ClassCastException in PageCacheFilter due to Last-Modified Header

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 1.21.0
    • Component/s: appng-core
    • Labels:

      Description

      The GenericResponseWrapper from ehchache-web wrongly stores the Last-Modified Header as java.lang.Long, which leads to the following error:

      java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String
      	at org.appng.core.controller.filter.PageCacheFilter$1.update(PageCacheFilter.java:141)
      	at org.appng.api.support.HttpHeaderUtils.handleModifiedHeaders(HttpHeaderUtils.java:83)
      	at org.appng.core.controller.filter.PageCacheFilter.handleLastModified(PageCacheFilter.java:138)
      	at org.appng.core.controller.filter.PageCacheFilter.handleCaching(PageCacheFilter.java:121)
      	at org.appng.core.controller.filter.PageCacheFilter.doFilter(PageCacheFilter.java:100)
      	at net.sf.ehcache.constructs.web.filter.Filter.doFilter(Filter.java:86)

        Attachments

          Activity

            People

            • Assignee:
              mueller.matthias Matthias Müller
              Reporter:
              mueller.matthias Matthias Müller
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: