rack/rack-contrib — pull request #64 by mipearson (2013-01-01 22:52:48+00:00)
Title: EnforceValidEncoding middleware.

Since migrating our application to Ruby 1.9 from Ruby 1.8 most of our logged exceptions have been due to spam bots sending bad UTF8 in query strings and paths.

This middleware rejects any path or query string that does not decode correctly.

The test in this PR depends on my other pull request that converts rack-contrib's specs to use bacon instead of specrb.