From f4b57b904dd4b6f6b4db6ff397cab23463890cc0 Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Sun, 30 Apr 2017 11:05:20 -0400 Subject: Default content type for `head` is `text/html` Otherwise Mime::NullType will be returned as the `Content-Type` header. --- actionpack/lib/action_controller/metal/head.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_controller/metal/head.rb') 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 -- cgit v1.2.3