CacheControlHeaderProvider produces invalid no-cache headers
------------------------------------------------------------

                 Key: CXF-2031
                 URL: https://issues.apache.org/jira/browse/CXF-2031
             Project: CXF
          Issue Type: Bug
          Components: REST
    Affects Versions: 2.1.4
         Environment: Windows XP
            Reporter: Matt Helgren


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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to