jelmer/dulwich — pull request #37 by eberle1080 (2011-11-24 00:25:25+00:00)
Title: Fixed broken pipe errors encountered during tests

This isn't really a bug fix, this is more of a cosmetic fix. Whenever the tests run, I kept seeing these broken pipe stack traces even though they weren't technically breaking anything (the git dumb http client would disconnect the instant it saw a 404, and wsgiref was trying to write more data).

The broken pipe errors were driving my ocd off the chart, and I wanted to see if there was a correct way to fix it. So I spent a while digging around in the wsgiref code and found out the "proper" way to stop this from occurring. Basically this patch is telling wsgi that the request is actually for a file (which is true). Once it knows this, it handles 404s differently and just shuts off the connection rather than trying to write human error messages like "so sorry, that url is unknown".

Anyways if you don't integrate this I totally understand, but I just thought you'd be interested to see one way to accomplish this.