Response header from fcgi server

wishmaster artemrts at ukr.net
Wed Sep 17 14:22:14 UTC 2014



 
 --- Original message ---
 From: "wishmaster" <artemrts at ukr.net>
 Date: 17 September 2014, 10:21:03
  


> 
> 
> 
> --- Original message ---
> From: "Francis Daly" <francis at daoine.org>
> Date: 17 September 2014, 10:06:47
> 
> 
> 
> > On Wed, Sep 17, 2014 at 08:49:36AM +0300, wishmaster wrote:
> > 
> > Hi there,
> > 
> > > PHP-application sends response with HTTP header X-Language and I need pass this to nginx.
> > > With Firebug I see this header, but variable $http_x_language or $sent_http_x_language is empty.
> > > 
> > > What I am doing wrong? 
> > 
> > $http_x_language is a request header field -- what the client sent
> > to nginx.
> > 
> > $sent_http_x_language is a response header field -- what nginx sent to
> > the client.
> > 
> > $upstream_http_x_language would be what an upstream sent to nginx.
> > 
> > What do you do? What do you see? What do you expect to see?
> > 
> Oh Francis, you help save me a lot of time as always, thanks.
> I did not know about $upstream_* variable
> 
> Without fastcgi caching, $sent_http_x_language is not empty, but if chaching is "ON", $sent_http_x_language variable is empty. But $upstream_* contain expected data.
> 

  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

Part of cached page:

KEY: httpGETexample.comfoto-video-audio/videoUAH
▒Expires: Thu, 19 Nov 1981 08:52:00 GMT
Pragma: no-cache
Content-Type: text/html; charset=utf-8
Last-Modified: Wed, 17 Sep 2014 13:59:43 GMT
Cache-Control: private
X-Language: uk
X-Accel-Buffering: yes


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

--
w



More information about the nginx mailing list