aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/http
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-03-06 08:22:43 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2014-03-06 08:22:43 -0800
commitb7192143edc8a8988c8ae0bffb13eb038f08ef16 (patch)
treea6ff66ece992d5cb593db84cc16061c492e9ce0c /actionpack/lib/action_dispatch/http
parent2e048bc007e9e0d25d2d243fedc1eb4b93a9428e (diff)
parented88a601f7b37de0f89b64249aaeed884faed836 (diff)
downloadrails-b7192143edc8a8988c8ae0bffb13eb038f08ef16.tar.gz
rails-b7192143edc8a8988c8ae0bffb13eb038f08ef16.tar.bz2
rails-b7192143edc8a8988c8ae0bffb13eb038f08ef16.zip
Merge pull request #14285 from sikachu/master-revert-render-body-remove-content-type
Do note remove `Content-Type` when `render :body`
Diffstat (limited to 'actionpack/lib/action_dispatch/http')
-rw-r--r--actionpack/lib/action_dispatch/http/response.rb13
1 files changed, 1 insertions, 12 deletions
diff --git a/actionpack/lib/action_dispatch/http/response.rb b/actionpack/lib/action_dispatch/http/response.rb
index f14ca1ea44..2c6bcf7b7b 100644
--- a/actionpack/lib/action_dispatch/http/response.rb
+++ b/actionpack/lib/action_dispatch/http/response.rb
@@ -63,8 +63,6 @@ module ActionDispatch # :nodoc:
# content you're giving them, so we need to send that along.
attr_accessor :charset
- attr_accessor :no_content_type # :nodoc:
-
CONTENT_TYPE = "Content-Type".freeze
SET_COOKIE = "Set-Cookie".freeze
LOCATION = "Location".freeze
@@ -305,17 +303,8 @@ module ActionDispatch # :nodoc:
!@sending_file && @charset != false
end
- def remove_content_type!
- headers.delete CONTENT_TYPE
- end
-
def rack_response(status, header)
- if no_content_type
- remove_content_type!
- else
- assign_default_content_type_and_charset!(header)
- end
-
+ assign_default_content_type_and_charset!(header)
handle_conditional_get!
header[SET_COOKIE] = header[SET_COOKIE].join("\n") if header[SET_COOKIE].respond_to?(:join)