rack/rack — pull request #592 by bestie (2013-08-10 19:23:18+00:00)
Title: Html exceptions only when accepted

Rather than be concerned with whether a request is an asynchronous browser
request or not it is better to simply consider the Accept header and only serve
HTML to clients that specifically ask for it.

This way you will not find your pure JSON API application splitting out HTML
error messages to your console when using curl :)