Response header from fcgi server

wishmaster artemrts at
Wed Sep 17 14:42:18 UTC 2014

 --- Original message ---
 From: "Francis Daly" <francis at>
 Date: 17 September 2014, 17:29:43

> 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.

 I know how this works.
> > 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.
At this time cache key uses $cookie_language, this works as expected. But I do not understand why with $http_ or $upstream_ does not work.

More information about the nginx mailing list