summaryrefslogtreecommitdiffhomepage
path: root/plugins/fcgi
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/fcgi')
-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");