cehoffman/sinatra-respond_to — pull request #14 by gkellogg (2012-02-10 23:56:45+00:00)
Title: Use Accept header and updates Accept header

Basically, the existing gem pretty much defaults to using the specified default_content instead of looking at the Accept header for matches. This update chooses a format based on what's in the accept header, and will match a format in the respond_to block using ordered Accept headers in addition to the detected format.

Identifying a format using the format query parameter or URI extension also modifies the Accept header (Sinatra and environment) to that other middleware can make use of this for proper output formatting.