From a5c51c33862580674c997be91dc705c2cf000a36 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 3 May 2009 22:10:54 +0000 Subject: http_request: switch to readpartial over sysread readpartial is actually as low-level as sysread is, except it's less likely to throw exceptions and won't change the blocking/non-blocking status of a file descriptor (we explicitly enable blocking I/O) --- test/unit/test_request.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/unit/test_request.rb b/test/unit/test_request.rb index 060da24..a6cb13c 100644 --- a/test/unit/test_request.rb +++ b/test/unit/test_request.rb @@ -14,7 +14,9 @@ include Unicorn class RequestTest < Test::Unit::TestCase - class MockRequest < StringIO; end + class MockRequest < StringIO + alias_method :readpartial, :sysread + end def setup @request = HttpRequest.new(Logger.new($stderr)) -- cgit v1.2.3-24-ge0c7