diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-01-22 11:04:52 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-01-22 11:43:06 +0000 |
commit | 705cf5fcf8ccb37deef5d2b922d6d78d34765c5b (patch) | |
tree | 19b250d132aa1c4f9a50b59d1096cf4ce8a34122 /t/t0200-rack-hijack.sh | |
parent | faf1edc74c9bb35cf4e131d794c1923bf124aa1c (diff) | |
download | unicorn-705cf5fcf8ccb37deef5d2b922d6d78d34765c5b.tar.gz |
Rack 1.5.0 (protocol version [1,2]) adds support for hijacking the client socket (removing it from the control of unicorn (or any other Rack webserver)). Tested with rack 1.5.0.
Diffstat (limited to 't/t0200-rack-hijack.sh')
-rwxr-xr-x | t/t0200-rack-hijack.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/t/t0200-rack-hijack.sh b/t/t0200-rack-hijack.sh new file mode 100755 index 0000000..23a9ee4 --- /dev/null +++ b/t/t0200-rack-hijack.sh @@ -0,0 +1,27 @@ +#!/bin/sh +. ./test-lib.sh +t_plan 5 "rack.hijack tests (Rack 1.5+ (Rack::VERSION >= [ 1,2]))" + +t_begin "setup and start" && { + unicorn_setup + unicorn -D -c $unicorn_config hijack.ru + unicorn_wait_start +} + +t_begin "check request hijack" && { + test "xhijack.OK" = x"$(curl -sSfv http://$listen/hijack_req)" +} + +t_begin "check response hijack" && { + test "xresponse.hijacked" = x"$(curl -sSfv http://$listen/hijack_res)" +} + +t_begin "killing succeeds" && { + kill $unicorn_pid +} + +t_begin "check stderr" && { + check_stderr +} + +t_done |