Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-2031

CacheControlHeaderProvider produces invalid no-cache headers

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.4
    • 2.2, 2.1.5
    • JAX-RS
    • None
    • Windows XP

    Description

      For my JAXRS services I need to add the no-cache directive to all responses. I've implemented a ResponseHandler that adds a CacheControl object with setNoCache(true) to the response. When verifying the response headers I see that the header "Cache-Control" is set to "public;no-cache=". My application client which is a Flex/Flash application continues to cache the XML its being sent from my services.

      I don't believe that "no-cache=" is valid in the HTTP 1.1 spec http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html. The "=" should only appear if optional field names are also specified.

      I got the source and modified the CacheControlHeaderProvider to only include the "=" when the optional fields were specified and everything works. The flex client is no longer caching the XML responses from my JAXRS services.

      Attachments

        Activity

          People

            Unassigned Unassigned
            matth1 Matt Helgren
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: