diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-06-28 05:20:17 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-06-28 05:20:17 +0000 |
commit | b75ad975856a681fe96651592b2bb24cc044fd50 (patch) | |
tree | 7ffad0a90429def0138c16633972bd660a990d27 | |
parent | eaf6cca3e1d38b7307c65c257b080041e65fd215 (diff) | |
download | rainbows-b75ad975856a681fe96651592b2bb24cc044fd50.tar.gz |
-rw-r--r-- | lib/rainbows/base.rb | 2 | ||||
-rw-r--r-- | lib/rainbows/fiber/base.rb | 2 | ||||
-rw-r--r-- | lib/rainbows/revactor.rb | 4 |
3 files changed, 3 insertions, 5 deletions
diff --git a/lib/rainbows/base.rb b/lib/rainbows/base.rb index cef2d2e..435c818 100644 --- a/lib/rainbows/base.rb +++ b/lib/rainbows/base.rb @@ -71,7 +71,7 @@ module Rainbows::Base remote_addr = Rainbows.addr(client) begin # loop - while ! hp.headers(env, buf) + until hp.headers(env, buf) IO.select([client], nil, nil, G.kato) or return buf << client.readpartial(CHUNK_SIZE) end diff --git a/lib/rainbows/fiber/base.rb b/lib/rainbows/fiber/base.rb index 1104fe7..e0be912 100644 --- a/lib/rainbows/fiber/base.rb +++ b/lib/rainbows/fiber/base.rb @@ -82,7 +82,7 @@ module Rainbows remote_addr = Rainbows.addr(io) begin # loop - while ! hp.headers(env, buf) + until hp.headers(env, buf) buf << (client.read_timeout or return) end diff --git a/lib/rainbows/revactor.rb b/lib/rainbows/revactor.rb index 0ec23d8..021fc48 100644 --- a/lib/rainbows/revactor.rb +++ b/lib/rainbows/revactor.rb @@ -44,9 +44,7 @@ module Rainbows::Revactor alive = true begin - while ! hp.headers(env, buf) - buf << client.read(*rd_args) - end + buf << client.read(*rd_args) until hp.headers(env, buf) env[CLIENT_IO] = client env[RACK_INPUT] = 0 == hp.content_length ? |