rev: fix static file responses under HTTP/0.9
commit5531ceb42a993ef8a68ed557fc77d052b89bccfb
authorEric Wong <normalperson@yhbt.net>
Tue, 20 Oct 2009 03:46:34 +0000 (19 20:46 -0700)
committerEric Wong <normalperson@yhbt.net>
Tue, 20 Oct 2009 03:51:56 +0000 (19 20:51 -0700)
tree0c40d89272e9c806fed0bbd51c64cf3ff0063961
parent48b19585b7f18fff930d61acccd4dcf540f3b605
rev: fix static file responses under HTTP/0.9

Since HTTP/0.9 responses have no headers to write, the
on_write_complete handler we rely on never got triggered,
leading to additional reads to never get queued up.

Additionally, we need to explicitly detect and close client
sockets if we've written the last response body since HTTP/0.9
clients never know when it's time to close a connection.
lib/rainbows/rev.rb
t/lib-large-file-response.sh