On 05/09/2011 12:55 PM, Chilappagari, Sairam wrote:

*
*

So do you think org.apache.cxf.jaxrs.impl.ResponseBuilderImpl is setting the headers wrong? Or ATS is not taking this into consideration? I'm kind of new to ATS so forgive my ignorance.


Let me ask Mnot, but I'd say they are wrong :). From the RFC2616 (sec 4.2):

Multiple message-header fields with the same field-name MAY be present in a message if and only if the entire field-value for that header field is defined as a comma-separated list [i.e., #(values)]. It MUST be possible to combine the multiple header fields into one "field-name: field-value" pair, without changing the semantics of the message, by appending each subsequent field-value to the first, each separated by a comma. The order in which header fields with the same field-name are received is therefore significant to the interpretation of the combined field value, and thus a proxy MUST NOT change the order of these field values when a message is forwarded.



One more question: If I just use max-age as my caching policy and nothing else, which value am I supposed to use for CONFIG proxy.config.http.cache.required_headers? (1 or 2)?


2. Any time you specify either Cache-Control: or Expires: directly from the origin, it's safer to set this config to "2" (which is why it's the default). If you set it to "1", then content without explicit cache control headers MAY be cached as well, based on heuristics on the Last-Modified header. IMO, if you control both the cache and proxy, you should always be explicit about cache control policies on the origin server (it's where it belongs).

Cheers,

-- Leif

Reply via email to