From e6dde6db7c1b59cc3fb145b73e062680dbcf2d67 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sun, 19 Feb 2023 17:41:35 +0100 Subject: Fixed FCGI environment --- plugins/fcgi/fcgi.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins') 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"); -- cgit v1.2.3