celluloid/reel — pull request #112 by unakatsuo (2013-11-06 07:09:10+00:00)
Title: Socket closed unexpectedly for chunked response with "Connection: close" request

``Reel::Connection#respond`` has not handled the response state correctly so that the socket was closed right after sending response headers when the request has ``Connection: close`` header. It works perfectly for keep-alive request though.

```
request = Reel::Connection.new(socket).request
request.respond :ok, :transfer_encoding => :chunked

# "Reel::SocketError: closed stream" raised here.
request << "Hello"
request << "World"
request.finish_response
```