summaryrefslogtreecommitdiffhomepage
path: root/plugins/fcgi/fcgi.cpp
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2023-02-19 17:41:35 +0100
committerRoland Reichwein <mail@reichwein.it>2023-02-19 17:41:35 +0100
commite6dde6db7c1b59cc3fb145b73e062680dbcf2d67 (patch)
treefc8226d0a83781cf285bbd4c54b8fdbb5c399737 /plugins/fcgi/fcgi.cpp
parentaa79e8701d39de2a24b2de7b97d3fc137e87b27b (diff)
Fixed FCGI environmentHEADv1.21master
Diffstat (limited to 'plugins/fcgi/fcgi.cpp')
-rw-r--r--plugins/fcgi/fcgi.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/fcgi/fcgi.cpp b/plugins/fcgi/fcgi.cpp
index 74a495a..c9b34ca 100644
--- a/plugins/fcgi/fcgi.cpp
+++ b/plugins/fcgi/fcgi.cpp
@@ -62,6 +62,8 @@ namespace {
{ "CACHE-CONTROL", [](std::string& v, FCGIContext& c){ c.SetResponseHeader("cache_control", v); } },
{ "CONTENT-TYPE", [](std::string& v, FCGIContext& c){ c.SetResponseHeader("content_type", v); } },
+
+ { "LOCATION", [](std::string& v, FCGIContext& c){ c.SetResponseHeader("location", v); } },
{ "SET-COOKIE", [](std::string& v, FCGIContext& c){ c.SetResponseHeader("set_cookie", v); } },
@@ -119,7 +121,7 @@ namespace {
env["REQUEST_METHOD"] = c.GetRequestParam("method");
env["DOCUMENT_ROOT"] = c.GetRequestParam("doc_root");
env["DOCUMENT_URI"] = target;
- env["REQUEST_URI"] = target;
+ env["REQUEST_URI"] = c.GetRequestParam("rel_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");