summaryrefslogtreecommitdiffhomepage
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/fcgi/fcgi.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/fcgi/fcgi.cpp b/plugins/fcgi/fcgi.cpp
index 95f03f6..74a495a 100644
--- a/plugins/fcgi/fcgi.cpp
+++ b/plugins/fcgi/fcgi.cpp
@@ -110,15 +110,18 @@ namespace {
}
env["PATH_INFO"] = c.GetRequestParam("rel_target");
- env["PATH_TRANSLATED"] = fs::path{c.GetRequestParam("rel_target")} / c.GetRequestParam("rel_target");
+ env["PATH_TRANSLATED"] = fs::path{c.GetRequestParam("doc_root")} / c.GetRequestParam("rel_target");
env["QUERY_STRING"] = query;
env["REMOTE_ADDR"] = "";
env["REMOTE_HOST"] = "";
env["REMOTE_IDENT"] = "";
env["REMOTE_USER"] = "";
env["REQUEST_METHOD"] = c.GetRequestParam("method");
+ env["DOCUMENT_ROOT"] = c.GetRequestParam("doc_root");
+ env["DOCUMENT_URI"] = target;
env["REQUEST_URI"] = target;
env["SCRIPT_NAME"] = c.GetRequestParam("target");
+ env["SCRIPT_FILENAME"] = fs::path{c.GetRequestParam("doc_root")} / c.GetRequestParam("target");
env["SERVER_NAME"] = c.GetRequestParam("host");
env["SERVER_PORT"] = c.GetServerParam("port");
env["SERVER_PROTOCOL"] = c.GetRequestParam("http_version");