On 11/4/11 11:44 AM, Gokce Toykuyu wrote:
Hello,

We are trying to utilize TS cache for the responses from our web
service. We seem to have either a configuration issue or an HTTP header
mismatch or..well, we need your help:)  basically, in the below
scenario, if I change the Accept: header to include "application/*" or
specifically "application/json" (e.g. Accept: text/*, text/html,
application/json) then it becomes a cache hit on TS and the origin
server is not called. I tried setting the vary headers and alternates
but nothing worked. Unfortunately, we don't have control over the
calling server, which is a middle man between the end user and us, and
it sends the Accept: header in the request but our response is
application/json which gets transmitted through this middle man back to
the caller.


Well, besides that "middle layer" being kinda nutty, why not just turn off the Vary header in your origin response? Does that not "work" ? I'm not entirely sure as to why this "breaks" anyways, you are Vary'ing on Accept-Encoding, which is not the same as "Accept". I'm guessing some logic here prevents us from accidentally serving out a cache alternate with certainty that we're doing it right.

-- Leif

Reply via email to