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

CacheResponseWrapper doesn't retrieve contentType correctly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.1, 5.6.3, 5.8.1
    • Fix Version/s: 5.6.4, 5.8.3, 5.9.1
    • Component/s: None
    • Labels:
    • Patch included:
      Yes
    • Testcase included:
      Yes
    • Release notes required:
      Yes
    • Epic Link:
    • Sprint:
      Maintenance 1, Maintenance 2
    • Story Points:
      8
    • Magnolia Release:
      5.7.7, 6.1.6, 6.2.1

      Description

      I added a (spring MVC) rest service for one of my content workspaces and noticed that cached responses have a content-type header of text/html instead of application/json.

      From what I can see, this is because CacheResponseWrapper stores the content-type header in its own map, but when invoking
      final String contentType = cachedResponse.getContentType()
      in Store.java
      then the header is incorrectly retrieved from the wrapped object instead, which holds a default text/html content type.

        Attachments

          Activity

            People

            Assignee:
            fgrilli Federico Grilli
            Reporter:
            ctytgat Tytgat Christian
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Time Spent - 0.45h Remaining Estimate - 0.65h
                0.65h
                Logged:
                Time Spent - 0.45h Remaining Estimate - 0.65h
                0.45h