diff options
author | Eric Wong <e@80x24.org> | 2016-11-29 03:30:02 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-11-29 21:01:54 +0000 |
commit | 7fe9d585056ea5002cd789d70c3ea4bd5000759c (patch) | |
tree | b211b22183dd66e532f1d26cf3bb3c09c404e800 /test/test_rack_hijack.rb | |
parent | 6e299e20c55aa8cc63597adf90ae4d370c086b83 (diff) | |
download | yahns-7fe9d585056ea5002cd789d70c3ea4bd5000759c.tar.gz |
We still need to iterate through all response headers to support response-only Rack hijacking. Previously, we only supported full hijacking on so-called "HTTP/0.9" clients. n.b. This diff will be easier to read with the -b/--ignore-space-change option of git-diff(1) or GNU diff(1)
Diffstat (limited to 'test/test_rack_hijack.rb')
-rw-r--r-- | test/test_rack_hijack.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test_rack_hijack.rb b/test/test_rack_hijack.rb index 671387e..c878552 100644 --- a/test/test_rack_hijack.rb +++ b/test/test_rack_hijack.rb @@ -86,6 +86,12 @@ class TestRackHijack < Testcase assert_equal "rack.input contents: BLAH", res.body assert_equal 201, res.code.to_i assert_equal "1.0", res.http_version + + # ancient "HTTP/0.9" + c = get_tcp_client(host, port) + c.write("GET /hijack_res\r\n\r\n") + res = Timeout.timeout(30) { c.read } + assert_equal 'response.hijacked', res ensure quit_wait(pid) end |