PATH_INFO
Dave Dash
dd at davedash.com
Wed Jan 23 20:56:16 MSK 2008
Yeah, I'm passing everything to FastCGI.
I'm using something similar to this:
location \.php(/|$) {
>
> set $script_name $uri;
> set $path_info "";
>
> if ($uri ~ ^(.+\.php)(/.+)) {
> set $script_name $1;
> set $path_info $2;
> }
>
> fastcgi_pass ...
>
> fastcgi_param SCRIPT_FILENAME /path*/to/*$script_name;
> fastcgi_param PATH_INFO $path_info;
> }
>
>
but really $path_info should be url_decoded before being set as a
fastcgi_param. Since the CGI spec says:
The extra path information, as given by the client. In other words, scripts
> can be accessed by their virtual pathname, followed by extra information at
> the end of this path. The extra information is sent as PATH_INFO. This
> information should be decoded by the server if it comes from a URL before it
> is passed to the CGI script.
>
>
But is there a way that I can just do
fstcgi_param PATH_INFO urldecode($path_info); ?
--
On Jan 23, 2008 3:55 AM, Aníbal Rojas <anibalrojas at gmail.com> wrote:
> Dave,
>
> There is no support for CGI in Nginx. You have to FastCGI or HTTP
> (proxy)
>
> --
> Aníbal Rojas
> http://hasmanydevelopers.com
> http://rubycorner.com
> http://anibal.rojas.com
>
> On Jan 24, 2008 2:40 AM, Dave Dash <dd at davedash.com> wrote:
> > PATH_INFO is supposed to be decoded by the server and then passed to
> > the CGI application.
> >
> > How can I do that from nginx. My PATH_INFO never gets decoded and it
> > throws off my CGI scripts.
> >
> > best,
> >
> > dd
> >
>
>
--
Dave Dash
612.670.0621
Discover your favorite restaurant: reviewsby.us
gtalk: dave.dash
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20080123/9a678db6/attachment.html>
More information about the nginx
mailing list