Uploaded image for project: 'Cache Modules'
  1. Cache Modules
  2. MGNLCACHE-196

Incorrect value in Content-Length header value

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 5.5.8, 5.6.2
    • 5.5.6, 5.6, 5.6.1
    • browser cache, gzip
    • None
    • CentOS

      With the following preconditions, the Content-Length header is incorrect:

      • Request to a Spring-Controller over an additional Blossom dispatcher servlet (configured as described in the Blossom documentation)
      • Request is cached by the Magnolia cache module
      • Gzip is enabled for this request

      The issue seems to be in the method info.magnolia.module.cache.filter.InMemoryCachedEntry#writeContent. The Spring-Controller adds the Content-Length header with the value of the uncompressed length to the HTTPServletResponse. The writeContent method in InMemoryCachedEntry.java sets the correct Content-Length value to the HTTPServletResponse but not to the Header-MultiMap used with the response wrapper and delivered to the browser.

      You can see an incorrect Header value in a browser.

        Acceptance criteria

              mmuehlebach Michael Mühlebach
              jfurrer Jonas Furrer
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD