projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ceee3af
)
plugins/mod_http: Keep query string over automatic redirects
author
daurnimator
<quae@daurnimator.com>
Mon, 15 Feb 2016 05:28:22 +0000
(16:28 +1100)
committer
daurnimator
<quae@daurnimator.com>
Mon, 15 Feb 2016 05:28:22 +0000
(16:28 +1100)
plugins/mod_http.lua
patch
|
blob
|
history
diff --git
a/plugins/mod_http.lua
b/plugins/mod_http.lua
index 086887fbcc9a9b63ccd078c3a65804481d12a419..c8ca563760939cee015e814b471dcc2b6281002c 100644
(file)
--- 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