rack/rack — pull request #531 by mcolyer (2013-03-21 20:45:06+00:00)
Title: Add #close to GzipStream and DeflateStream classes

On Heroku when using unicorn, the deflater middleware will occasionally fail to properly close the body. This results in deadlock errors.

By adding close methods to these classes, we ensure that unicorn calls close in all cases. I'm guessing that the occasional failures are caused by requests that are terminated prematurely and the ensure block within the each method isn't triggered. This fixes that because unicorn wraps the method which calls each with an ensure clause that calls close.