diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-11-26 14:09:45 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-11-26 14:19:04 -0800 |
commit | 5868eeecb2fbc85f3e4fabf3d16f27d259491c0d (patch) | |
tree | 21746be61158f9c177bc8e2600d7922cdedc7ce1 /t/t0000-simple-http.sh | |
parent | 278d9d5a7f3d2dc3c6563af1584b5e773e08073d (diff) | |
download | rainbows-5868eeecb2fbc85f3e4fabf3d16f27d259491c0d.tar.gz |
Make sure app errors get logged correctly, and we no longer return a 500 response when a client EOFs the write end (but not the read end) of a connection.
Diffstat (limited to 't/t0000-simple-http.sh')
-rwxr-xr-x | t/t0000-simple-http.sh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/t/t0000-simple-http.sh b/t/t0000-simple-http.sh index 173281b..6f4d738 100755 --- a/t/t0000-simple-http.sh +++ b/t/t0000-simple-http.sh @@ -1,6 +1,6 @@ #!/bin/sh . ./test-lib.sh -t_plan 24 "simple HTTP connection keepalive/pipelining tests for $model" +t_plan 25 "simple HTTP connection keepalive/pipelining tests for $model" t_begin "checking for config.ru for $model" && { tbase=simple-http_$model.ru @@ -21,6 +21,17 @@ t_begin "single request" && { curl -sSfv http://$listen/ } +t_begin "handles client EOF gracefully" && { + printf 'GET / HTTP/1.1\r\nHost: example.com\r\n\r\n' | \ + socat - TCP4:$listen > $tmp + dbgcat tmp + if grep 'HTTP.* 500' $tmp + then + die "500 error returned on client shutdown(SHUT_WR)" + fi + check_stderr +} + dbgcat r_err t_begin "two requests with keepalive" && { |