Response header from fcgi server

Francis Daly francis at daoine.org
Wed Sep 17 14:29:33 UTC 2014


On Wed, Sep 17, 2014 at 05:22:14PM +0300, wishmaster wrote:

Hi there,

>   My problem is still actual.
>   I am attempting to use http header from fastcgi server as part of cache key.
>   $upstream_http_x_language contains value, but empty in cache key

How should that work?

A request comes in to nginx.

nginx creates the cache key to see if it should serve the request from
cache, or should pass the request along to upstream and store the response
in cache.

If you try to put something into your cache key that nginx can only know
about after the request has been passed upstream, you are going to have
a problem.

> Part of cached page:
> 
> KEY: httpGETexample.comfoto-video-audio/videoUAH

> key must be
> httpGETexample.comfoto-video-audio/videoukUAH

Why does this matter?

What two requests would lead to upstream sending content with a different
language? Use whatever is different in those requests in your cache key.

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list