aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_http.lua
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2016-02-15 16:28:22 +1100
committerdaurnimator <quae@daurnimator.com>2016-02-15 16:28:22 +1100
commit6c59f3565f5d2a268655c8750b5deba680a71355 (patch)
tree4c5855b2d92d47b5424c9d86a97115bb198274e7 /plugins/mod_http.lua
parentcce0c6c56f64ff81c86e8aaaa79144a5e7e2d5fe (diff)
downloadprosody-6c59f3565f5d2a268655c8750b5deba680a71355.tar.gz
prosody-6c59f3565f5d2a268655c8750b5deba680a71355.zip
plugins/mod_http: Keep query string over automatic redirects
Diffstat (limited to 'plugins/mod_http.lua')
-rw-r--r--plugins/mod_http.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/mod_http.lua b/plugins/mod_http.lua
index 086887fb..c8ca5637 100644
--- a/plugins/mod_http.lua
+++ b/plugins/mod_http.lua
@@ -47,6 +47,9 @@ end
local function redir_handler(event)
event.response.headers.location = event.request.path.."/";
+ if event.request.url.query then
+ event.response.headers.location = event.response.headers.location .. "?" .. event.request.url.query
+ end
return 301;
end