aboutsummaryrefslogtreecommitdiffstats
path: root/test/net
diff options
context:
space:
mode:
Diffstat (limited to 'test/net')
-rw-r--r--test/net/http/test_http.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/net/http/test_http.rb b/test/net/http/test_http.rb
index 6de57d3196..e2cfb42670 100644
--- a/test/net/http/test_http.rb
+++ b/test/net/http/test_http.rb
@@ -605,4 +605,16 @@ class TestNetHTTPKeepAlive < Test::Unit::TestCase
assert_kind_of String, res.body
}
end
+
+ def test_keep_alive_EOF
+ def @server.run(sock)
+ sock.close
+ end
+
+ start {|http|
+ assert_raises(EOFError) {
+ res = http.get('/')
+ }
+ }
+ end
end