diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-10-05 22:09:20 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-10-05 22:09:20 +0000 |
commit | fd6b47cf1690cb45f2144cd92e0fe1f301c7c37b (patch) | |
tree | 37c7df590221318380a086269a8aa4c4a20670d4 /test/unit/test_request.rb | |
parent | 350e8fa3a94838bcc936782315b3472615fe6517 (diff) | |
download | unicorn-fd6b47cf1690cb45f2144cd92e0fe1f301c7c37b.tar.gz |
TeeInput methods may be invoked deep in the stack, so avoid giving them more work to do if a client disconnects due to a bad upload.
Diffstat (limited to 'test/unit/test_request.rb')
-rw-r--r-- | test/unit/test_request.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/unit/test_request.rb b/test/unit/test_request.rb index 8aae344..5ac511f 100644 --- a/test/unit/test_request.rb +++ b/test/unit/test_request.rb @@ -163,6 +163,10 @@ class RequestTest < Test::Unit::TestCase length = bs * count client = Tempfile.new('big_put') def client.kgio_addr; '127.0.0.1'; end + def client.kgio_read(*args) + readpartial(*args) + rescue EOFError + end client.syswrite( "PUT / HTTP/1.1\r\n" \ "Host: foo\r\n" \ |