Do note remove `Content-Type` when `render :body` #14286

Merged
merged 1 commit into from Mar 6, 2014

Projects

None yet

2 participants

@sikachu
Member
sikachu commented Mar 5, 2014

render :body should just not set the Content-Type header. By
removing the header, it breaks the compatibility with other parts.

After this commit, render :body will returns text/html content type,
sets by default from ActionDispatch::Response, and it will preserve
the overridden content type if you override it.

Fixes #14197, #14238

This partially reverts commit 3047376.


This is for 4-1-stable.

@sikachu sikachu Do note remove `Content-Type` when `render :body`
`render :body` should just not set the `Content-Type` header. By
removing the header, it breaks the compatibility with other parts.

After this commit, `render :body` will returns `text/html` content type,
sets by default from `ActionDispatch::Response`, and it will preserve
the overridden content type if you override it.

Fixes #14197, #14238

This partially reverts commit 3047376.
c3bca73
@sikachu sikachu added this to the 4.1.0 milestone Mar 5, 2014
@tenderlove tenderlove was assigned by sikachu Mar 5, 2014
@tenderlove tenderlove merged commit 58db2df into rails:4-1-stable Mar 6, 2014

1 check passed

default The Travis CI build passed
Details
@sikachu sikachu deleted the sikachu:4-1-stable-revert-render-body-remove-content-type branch Mar 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment