diff options
author | Eric Wong <e@80x24.org> | 2016-07-03 23:21:14 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-07-05 20:38:01 +0000 |
commit | 97ef2a9c592fbdb756aa6a73e2e6c90b6b3cda18 (patch) | |
tree | 41759197b5af676d5ad101505bc9d026812fe868 /test/test_extras_try_gzip_static.rb | |
parent | 405435825e90c5f79209946ecd8fc842519b42ba (diff) | |
download | yahns-97ef2a9c592fbdb756aa6a73e2e6c90b6b3cda18.tar.gz |
This is mainly to benefit curl(1) users who forget to use '-f' to show failures. Not sure if I want to keep this change, it seems like bloat; but Rack::ShowStatus pages are totally overkill...
Diffstat (limited to 'test/test_extras_try_gzip_static.rb')
-rw-r--r-- | test/test_extras_try_gzip_static.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/test/test_extras_try_gzip_static.rb b/test/test_extras_try_gzip_static.rb index 60129df..b6d5943 100644 --- a/test/test_extras_try_gzip_static.rb +++ b/test/test_extras_try_gzip_static.rb @@ -125,11 +125,10 @@ class TestExtrasTryGzipStatic < Testcase req = "#{m} /COPYING HTTP/1.0\r\n" \ "Range: bytes=66666666-\r\nAccept-Encoding: gzip" - body = check.call(req) do |head| + check.call(req) do |head| assert_match %r{^Content-Range: bytes \*/#{st.size}\r\n}, head assert_match %r{\AHTTP/1\.1 416 }, head end - assert_nil body end end @@ -181,15 +180,13 @@ class TestExtrasTryGzipStatic < Testcase Timeout.timeout(30) do # 404 %w(GET HEAD).each do |m| req = "#{m} /cp-ing HTTP/1.0\r\nAccept-Encoding: gzip" - body = check.call(req) do |head| + check.call(req) do |head| assert_match %r{HTTP/1\.1 404 }, head end - assert_nil body end - body = check.call("FOO /COPYING HTTP/1.0") do |head| + check.call("FOO /COPYING HTTP/1.0") do |head| assert_match %r{HTTP/1\.1 405 }, head end - assert_nil body end Net::HTTP.start(host, port) do |http| |