celluloid/reel — pull request #4 by afcapel (2012-08-06 19:39:51+00:00)
Title: Fix rack specs

The specs are passing now.

There was a problem with the connection loop. It is designed to be used like this

```
while request = connection.request
end
```

But since Connection#request is memoized the loop was processing the same request endlessly. To solve the problem I added [this guard](https://github.com/afcapel/reel/blob/3e7b7cab32e31157dc3b3d9ba3c93eab120a49f1/lib/reel/connection.rb#L42) and seems to work fine but I am not completely happy with it. The keepalive variable won't work since it [can be set to false](https://github.com/afcapel/reel/blob/3e7b7cab32e31157dc3b3d9ba3c93eab120a49f1/lib/reel/connection.rb#L49) while parsing the request and before a response is sent.

Perhaps are more explicit API to know if a connection is done would be useful.