Igor Sysoev igor at
Mon Feb 15 22:32:49 MSK 2010

On Mon, Feb 15, 2010 at 08:00:20PM +0100, witekfl wrote:

> Hi,
> there is a small bug in nginx-0.8.33 in ngx_http_variables.c in line 497.
> Should be 14 there.
> I wrote an alternative mod_rewrite module for Apache, which in the response
> set header X-Accel-Redirect.
> I also set X-Path-Info there.
> In the nginx.conf I tried to set:
> fastcgi_param PATH_INFO $upstream_http_x_path_info; # but
> $upstream_http_x_path_info is empty. Why?
> How could I set PATH_INFO without patching nginx, to the value of the
> X-Path-Info header got from proxy?

Thank you for report. However, the issue is not related to this.
The problem is that all upstream variables are cleaned when
nginx initiates new upstream request. Thus you should save the
variable value in an usual varaible:

     set           $path_info  $upstream_http_x_path_info;
     fastcgi_param PATH_INFO   $path_info;

Igor Sysoev

More information about the nginx-devel mailing list