rails/rails — pull request #7231 by armanddp (2012-08-01 21:53:29+00:00)
Title: Remove single character body in head(:no_content) response 

Rails included a single character response body to work around an old Safari bug where headers were ignored if no content was sent.

This patch brings the behavior slightly closer to spec if :no_content/204 is explicity requested via a head only response by sending a no content in the response body.

The single character body breaks especially JSON parsers on iOS etc that sees it as invalid content. By localising the change to only 204 responses this should allow API implementers to use the 204 status code when no content is sent back.