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 /plugins/fcgi/fcgi.cpp | |
parent | aaaaed8479368b87bc6960dc6abe5a97b4cc7ef9 (diff) |
Completed and fixed FCGI environment variables
Diffstat (limited to 'plugins/fcgi/fcgi.cpp')
-rw-r--r-- | plugins/fcgi/fcgi.cpp | 5 |
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"); |