summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--debian/changelog1
-rw-r--r--plugins/fcgi/fcgi.cpp5
2 files changed, 5 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 9a1ad78..5a3e9a8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
webserver (1.21) UNRELEASED; urgency=medium
* Separated out weblog
+ * Completed FCGI environment variables
-- Roland Reichwein <mail@reichwein.it> Sat, 11 Feb 2023 11:01:48 +0100
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");