Cache revalidate modified timezone mismatch

I have a backend returning a last modified header in CEST.

I’m using a 1sec proxy that revalidates as described here:
http://whitequark.org/blog/2014/04/05/page-caching-with-nginx/

My problem is that when nginx makes the request to the backend it
changes
CEST into GMT, without adjusting the time. Therefore the backend returns
a
304 for 1sec + 1 hour, instead of 1sec :frowning:

I tried to do something like set TZ and then start nginx, but this
doesn’t
seem to make a difference.

export TZ=“Europe/Amsterdam”
sudo nginx

What’s going on and how can I fix this?

Thijs

I’m using version 1.5.12 btw.

On Wed, May 7, 2014 at 4:51 PM, Thijs K.

On 7 May 2014 15:51, Thijs K. [email protected] wrote:

I have a backend returning a last modified header in CEST.

RF2616 says “All HTTP date/time stamps MUST be represented in
Greenwich Mean Time (GMT), without exception”.

I’m not very surprised nginx isn’t doing what you expect. Fix your
backend.

What’s going on

I suspect nginx is merely munging the header into something that
matches the HTTP spec, and (arguably correctly) isn’t looking at the
actual meaning of the header being modified.

and how can I fix this?

Fix your backend.

J

Aha good to know! I’m not responsible for this backend, so I’ll harass
my
colleague about it :slight_smile: Thanks.

Thijs

On Wed, May 7, 2014 at 5:34 PM, Jonathan M.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs