gratily improved the php plugin

This commit is contained in:
roberto@oneiric64
2011-12-21 15:00:14 +01:00
parent fcd1a36420
commit 545f3ee608
7 changed files with 240 additions and 38 deletions
+6 -1
View File
@@ -415,7 +415,7 @@ int uwsgi_cgi_walk(struct wsgi_request *wsgi_req, char *full_path, char *docroot
// not a directory, stop walking
if (!S_ISDIR(st.st_mode)) {
if (i < (wsgi_req->path_info_len-discard_base)-1) {
*path_info = ptr + i + 1;
*path_info = ptr + i;
}
return 0;
@@ -736,6 +736,11 @@ clear:
uwsgi_error("setenv()");
}
// for newer php
if (setenv("REDIRECT_STATUS", "200", 0)) {
uwsgi_error("setenv()");
}
if (path_info && wsgi_req->path_info_len-discard_base > 0) {
if (setenv("PATH_INFO", uwsgi_concat2n(path_info, wsgi_req->path_info_len-discard_base, "", 0), 1)) {
uwsgi_error("setenv()");