| From | Sent On | Attachments |
|---|---|---|
| androo | Apr 6, 2009 4:54 pm | |
| Denis F. Latypoff | Apr 6, 2009 7:49 pm | |
| androo | Apr 7, 2009 8:02 pm | |
| My SchizoBuddy | Dec 10, 2009 6:27 am | |
| Igor Sysoev | Dec 10, 2009 6:40 am | |
| spirit | Dec 16, 2009 5:39 am | |
| Igor Sysoev | Dec 16, 2009 5:55 am | |
| locojohn | Jul 7, 2011 6:21 am |
| Subject: | Re: fastcgi server variables vs. apache | |
|---|---|---|
| From: | locojohn (ngin...@nginx.us) | |
| Date: | Jul 7, 2011 6:21:22 am | |
| List: | ru.sysoev.nginx | |
Dear Igor,
According to my understanding, either way PATH_INFO is set to url-encoded string, while according to CGI 1.1 specification, it should contain the url-decoded string. Which brings troubles when there are spaces in file names, for instance.
I am using nginx 1.0.4 and this still seems like an issue. Is there a way to pass url-decoded strings over to fastcgi applications?
Thank you in advance for response!
Andrejs
Igor Sysoev Wrote:
-------------------------------------------------------
On Wed, Dec 16, 2009 at 08:40:17AM -0500, spirit wrote:
if (in fact you can't), you can still set variables to do so. Example
set $script index.php; set $path_info ""; if ($uri ~ "^(.+\.php)(.*)") { set $script $1; set $path_info $2; } fastcgi_param PATH_INFO $path_info; ....
It's better to use fastcgi_split_path_info:
location ~ ^(.+\.php)(.*)$ { fastcgi_split_path_info ^(.+\.php)(.*)$; fastcgi_param SCRIPT_FILENAME /path/to/php$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info;
or named captures:
location ~ ^(?<script_name>.+\.php)(?<path_info>.*)$ {
fastcgi_param SCRIPT_FILENAME /path/to/php$script_name; fastcgi_param PATH_INFO $path_info;
-- Igor Sysoev http://sysoev.ru/en/
_______________________________________________ nginx mailing list ngi...@nginx.org http://nginx.org/mailman/listinfo/nginx
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,866,212002#msg-212002
_______________________________________________ nginx mailing list ngi...@nginx.org http://nginx.org/mailman/listinfo/nginx





