diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-11-21 00:05:02 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-11-21 00:05:02 +0000 |
commit | d3c08764deb3345c5bdc34b35d2dd2a2d8a4771e (patch) | |
tree | 31183c4d844ccf68bf458f5a8252f384a9686da9 | |
parent | a73444af13ce8ac9cd94347c627f8191b3a80634 (diff) | |
download | mogilefs-client-d3c08764deb3345c5bdc34b35d2dd2a2d8a4771e.tar.gz |
Ugh, shouldn't use sysread there
-rw-r--r-- | test/test_mogilefs.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/test_mogilefs.rb b/test/test_mogilefs.rb index ef72ab8..3308585 100644 --- a/test/test_mogilefs.rb +++ b/test/test_mogilefs.rb @@ -255,7 +255,12 @@ class TestMogileFS__MogileFS < TestMogileFS t = TempServer.new(Proc.new do |serv, accept| client, _ = serv.accept client.sync = true - received.syswrite(client.recv(4096, 0)) + seen = "" + while seen !~ /\r\n\r\ndata/ + buf = client.readpartial(4096) + seen << buf + received.syswrite(buf) + end client.send("HTTP/1.0 200 OK\r\n\r\n", 0) client.close end) |