You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the PSGI spec: PATH_INFO If this key is not empty, it MUST start with a forward slash (/).
I'm seeing PATH_INFO like 'public' instead of '/public', with nginx 0.7.59
This happens with BOTH of:
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param PATH_INFO /$fastcgi_script_name;
In my nginx config. And so appears to be something I can't control / fix.
Should there be a middleware to detect/correct this for specific nginx releases (I don't know which ones yet...), or is it a generic enough fix (just prepending the slash if not present and non-empty) to just add to the FCGI handler?
Thoughts welcome about the best way to fix this - I'm happy to work up test cases and a patch once I've got your opinion about where would be best to patch.
The text was updated successfully, but these errors were encountered:
Here's the relevant snippet from the docs: note that none of them uses nginx-provided FCGI params for script_name or path_info since it's known to be incorrect.
location / {
set $script "";
set $path_info $uri;
fastcgi_pass unix:/tmp/fastcgi.sock;
fastcgi_param SCRIPT_NAME $script;
fastcgi_param PATH_INFO $path_info;
From the PSGI spec: PATH_INFO If this key is not empty, it MUST start with a forward slash (/).
I'm seeing PATH_INFO like 'public' instead of '/public', with nginx 0.7.59
This happens with BOTH of:
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param PATH_INFO /$fastcgi_script_name;
In my nginx config. And so appears to be something I can't control / fix.
Should there be a middleware to detect/correct this for specific nginx releases (I don't know which ones yet...), or is it a generic enough fix (just prepending the slash if not present and non-empty) to just add to the FCGI handler?
Thoughts welcome about the best way to fix this - I'm happy to work up test cases and a patch once I've got your opinion about where would be best to patch.
The text was updated successfully, but these errors were encountered: