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

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

    Details

    • Workaround:
      Workaround Exists
    • Workaround Description:
      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  pjurak Petr Jurak
                  Reporter:
                  michbeck100 Michael Kotten
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: