aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/http
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_dispatch/http')
-rw-r--r--actionpack/lib/action_dispatch/http/response.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/http/response.rb b/actionpack/lib/action_dispatch/http/response.rb
index 8efc905384..71e7ebb838 100644
--- a/actionpack/lib/action_dispatch/http/response.rb
+++ b/actionpack/lib/action_dispatch/http/response.rb
@@ -318,6 +318,7 @@ module ActionDispatch # :nodoc:
private
ContentTypeHeader = Struct.new :mime_type, :charset
+ NullContentTypeHeader = ContentTypeHeader.new nil, nil
def parse_content_type(content_type)
if content_type
@@ -325,7 +326,7 @@ module ActionDispatch # :nodoc:
type = nil if type.empty?
ContentTypeHeader.new(type, charset)
else
- ContentTypeHeader.new(nil, nil)
+ NullContentTypeHeader
end
end