My problem is that nginx deletes the ETag header from the response even
if I
specify proxy_pass_header ETag.
The upstream server does return the correct headers:
On Thu, Sep 12, 2013 at 07:07:29AM -0400, ochronus wrote:
[…]
My problem is that nginx deletes the ETag header from the response even if I
specify proxy_pass_header ETag.
The upstream server does return the correct headers:
The ETag header is removed if nginx changes a response returned.
That is, if you have gzip, gunzip, sub, addition, ssi or xslt
filters applied to responses returned.
Thanks a lot for the quick response!
Indeed, I had gzip turned on globally.
This is still strange though, is there no way to pass the Etag header
from
the upstream in this case?
On Thu, Sep 12, 2013 at 08:07:00AM -0400, ochronus wrote:
Thanks a lot for the quick response!
Indeed, I had gzip turned on globally.
This is still strange though, is there no way to pass the Etag header from
the upstream in this case?
The ETag header used in it’s strong from means that it must be
changed whenever bits of an entity are changed. This basically
means that ETag headers have to be removed by filters which change
a response content.
Weak ETags may be preserved, though they are not supported by
nginx yet. Mostly because Last-Modified is good enough
alternative to week ETags.
Thank you again for your exhaustive answer.
I think I won’t drop HAProxy so soon
As an aside, I’m pretty sure HAP doesn’t do /anything/ meaningful with
etags as it doesn’t examine response bodies’ content, nor does it cache.
Very happy to be told otherwise, but you may merely be seeing
unintended
consequences if HAP seems to be doing something more appropriate with
your
upstream’s replies.
HTH,
J
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.