diff options
author | Roland Reichwein <mail@reichwein.it> | 2023-02-12 18:00:17 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2023-02-12 18:00:17 +0100 |
commit | 3282755c3798b695177c961a5745267cda6c21c4 (patch) | |
tree | 699db3469f8e6d76b9a16bfd8311b2cbcebe1f87 | |
parent | aaaaed8479368b87bc6960dc6abe5a97b4cc7ef9 (diff) |
Completed and fixed FCGI environment variables
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | plugins/fcgi/fcgi.cpp | 5 |
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"); |