In a respond_to block, the block passed to the individual format *can not* set the status of the response, as the responder_mixin swallows any status.
e.g.:
respond_to do |format|
format.xml do
headersLocation? = '/foo/1.xml'
render :nothing => 201
end
end
would yield a response code of 200, as the responder_mixin was manually setting this status when it felt it had successfully called the block. this patch modifies this behavior to inherit the status from the global request object and only set the status in case of an unsupported content-type (406 not supported). Passing spec in diff.