diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-12-26 03:30:36 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-12-26 09:53:30 +0000 |
commit | 7bfd7995fd403f80940e3f6ac36f9ae58b7040cb (patch) | |
tree | e5822c83d2e429d893461dc32d4f0478ea281525 /lib/rainbows/rev/thread.rb | |
parent | 92a11cdfe00c5e551388c2cc1a62bfc59d568c6f (diff) | |
download | rainbows-7bfd7995fd403f80940e3f6ac36f9ae58b7040cb.tar.gz |
The HttpParser#next? method will come with keepalive protection for Rainbows!, which can prevent clients from monopolizing a server with excessive pipelining/keepalive requests.
Diffstat (limited to 'lib/rainbows/rev/thread.rb')
-rw-r--r-- | lib/rainbows/rev/thread.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/rainbows/rev/thread.rb b/lib/rainbows/rev/thread.rb index 2356ae2..0f36ce5 100644 --- a/lib/rainbows/rev/thread.rb +++ b/lib/rainbows/rev/thread.rb @@ -20,11 +20,10 @@ module Rainbows # this is only called in the master thread def response_write(response) - alive = @hp.keepalive? && G.alive + alive = @hp.next? && G.alive rev_write_response(response, alive) return quit unless alive && :close != @state - @hp.reset @state = :headers end |