diff options
author | Jon Moss <me@jonathanmoss.me> | 2017-04-30 11:05:20 -0400 |
---|---|---|
committer | Jon Moss <me@jonathanmoss.me> | 2017-04-30 11:05:20 -0400 |
commit | f4b57b904dd4b6f6b4db6ff397cab23463890cc0 (patch) | |
tree | 350a41a5bc8a9fd519950e5350f9b58a3a3a5e31 /actionpack/lib/action_controller/metal | |
parent | da70168715c02980986279d60e3c6631cfb164d2 (diff) | |
download | rails-f4b57b904dd4b6f6b4db6ff397cab23463890cc0.tar.gz rails-f4b57b904dd4b6f6b4db6ff397cab23463890cc0.tar.bz2 rails-f4b57b904dd4b6f6b4db6ff397cab23463890cc0.zip |
Default content type for `head` is `text/html`
Otherwise Mime::NullType will be returned as the `Content-Type` header.
Diffstat (limited to 'actionpack/lib/action_controller/metal')
-rw-r--r-- | actionpack/lib/action_controller/metal/head.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal/head.rb b/actionpack/lib/action_controller/metal/head.rb index 0c50894bce..1748fbd7c8 100644 --- a/actionpack/lib/action_controller/metal/head.rb +++ b/actionpack/lib/action_controller/metal/head.rb @@ -36,7 +36,7 @@ module ActionController self.response_body = "" if include_content?(response_code) - self.content_type = content_type || (Mime[formats.first] if formats) + self.content_type = content_type || (Mime[formats.first] if formats) || Mime[:html] response.charset = false end |