Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-2038

CacheInterceptor uses content type of response as mediatype instead of accept header of request

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 3.6.2.Final, 4.0.0.Beta6
    • 3.0.24.Final
    • jaxrs
    • None
    • Workaround Exists
    • Hide

      client must send an accept header that matches exactly the content type of the response

      Show
      client must send an accept header that matches exactly the content type of the response

    Description

      If a client sends an accept header like application/json but the server answers with content type application/json;charset=UTF-8 (Spring does this by default), then the client cache won't work.

      I would say that the problem is, that the content type of the response is used when adding the first response to the cache. But this might not be what the client asked for. Even if the content type of the response is text/xml when asking for application/json, it should still be cached under application/json.

      Attachments

        Issue Links

          Activity

            People

              pjurak Petr Jurak (Inactive)
              michaelkotten Michael Kotten (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: