summaryrefslogtreecommitdiffhomepage
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
parentaa79e8701d39de2a24b2de7b97d3fc137e87b27b (diff)
Fixed FCGI environmentHEADv1.21master
-rw-r--r--debian/changelog4
-rw-r--r--plugins/fcgi/fcgi.cpp4
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");