2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-05 08:59:27 +08:00

FIX: ensure proper header transfer (except for cache control)

allows discourse special headers to be visible on hijacked reqs
This commit is contained in:
Sam 2018-01-21 14:26:42 +11:00
parent 7b05b12d3c
commit fc36f095a7
2 changed files with 23 additions and 5 deletions

View file

@ -114,6 +114,16 @@ describe Hijack do
expect(headers).to eq(expected)
end
it "handles transfers headers" do
tester.response.headers["Hello-World"] = "sam"
tester.hijack_test do
expires_in 1.year
render body: "hello world", status: 402
end
expect(tester.io.string).to include("Hello-World: sam")
end
it "handles expires_in" do
tester.hijack_test do
expires_in 1.year