diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-06-29 03:03:35 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-06-29 04:07:01 -0700 |
commit | 93f55bb8802866e8f9a2d741ecec6a75973f2c72 (patch) | |
tree | 7c1ac59312f57e9d35f0d247f736e0736b340555 | |
parent | d7b3fb8053315c2ecf4d66199b028df5070e1ab8 (diff) | |
download | unicorn-93f55bb8802866e8f9a2d741ecec6a75973f2c72.tar.gz |
This has been broken since 6945342a1f0a4caaa918f2b0b1efef88824439e0 "Transfer-Encoding: chunked streaming input support" but somehow never caught by me or anyone else.
-rw-r--r-- | test/unit/test_upload.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/unit/test_upload.rb b/test/unit/test_upload.rb index 8bb83c5..4c0790f 100644 --- a/test/unit/test_upload.rb +++ b/test/unit/test_upload.rb @@ -103,7 +103,11 @@ class UploadTest < Test::Unit::TestCase sock.syswrite('12345') # write 4 bytes more than we expected @sha1.update('1') - read = sock.read.split(/\r\n/) + buf = sock.readpartial(4096) + while buf !~ /\r\n\r\n/ + buf << sock.readpartial(4096) + end + read = buf.split(/\r\n/) assert_equal "HTTP/1.1 200 OK", read[0] resp = eval(read.grep(/^X-Resp: /).first.sub!(/X-Resp: /, '')) assert_equal to_upload, resp[:size] |