diff options
-rw-r--r-- | debian/changelog | 4 | ||||
-rw-r--r-- | plugins/fcgi/fcgi.cpp | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog index 82e19e2..19a598d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,10 @@ -webserver (1.21) UNRELEASED; urgency=medium +webserver (1.21) unstable; urgency=medium * Separated out weblog * Completed FCGI environment variables * Enable multiple arguments for FCGI app when run via webapp-runner - -- Roland Reichwein <mail@reichwein.it> Sat, 11 Feb 2023 11:01:48 +0100 + -- Roland Reichwein <mail@reichwein.it> Sun, 19 Feb 2023 17:41:09 +0100 webserver (1.20) unstable; urgency=medium 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"); |