Redirects should not contain newlines

This commit is contained in:
Simon MacMullen 2012-11-23 10:28:26 +00:00
parent 07c02fe4ab
commit 1929347496
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ register_port_redirect(Name, Listener, Prefix, RedirectPort) ->
Header -> hd(string:tokens(Header, ":"))
end,
URL = rabbit_misc:format(
"~s://~s:~B~s~n",
"~s://~s:~B~s",
[Req:get(scheme), Host, RedirectPort, Req:get(raw_path)]),
Req:respond({301, [{"Location", URL}], ""})
end,