aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal/head.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/metal/head.rb')
-rw-r--r--actionpack/lib/action_controller/metal/head.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/metal/head.rb b/actionpack/lib/action_controller/metal/head.rb
index 2fcd933d32..747e1273be 100644
--- a/actionpack/lib/action_controller/metal/head.rb
+++ b/actionpack/lib/action_controller/metal/head.rb
@@ -29,19 +29,19 @@ module ActionController
self.status = status
self.location = url_for(location) if location
- if include_content_headers?(self.status)
+ if include_content?(self.status)
self.content_type = content_type || (Mime[formats.first] if formats)
+ self.response_body = " "
else
headers.delete('Content-Type')
headers.delete('Content-Length')
+ self.response_body = ""
end
-
- self.response_body = " "
end
private
# :nodoc:
- def include_content_headers?(status)
+ def include_content?(status)
case status
when 100..199
false