aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/testing/request_encoder.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_dispatch/testing/request_encoder.rb')
-rw-r--r--actionpack/lib/action_dispatch/testing/request_encoder.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/testing/request_encoder.rb b/actionpack/lib/action_dispatch/testing/request_encoder.rb
index 9889f61951..6c65bec62f 100644
--- a/actionpack/lib/action_dispatch/testing/request_encoder.rb
+++ b/actionpack/lib/action_dispatch/testing/request_encoder.rb
@@ -38,8 +38,8 @@ module ActionDispatch
end
def self.parser(content_type)
- mime = Mime::Type.lookup(content_type)
- encoder(mime ? mime.ref : nil).response_parser
+ type = Mime::Type.lookup(content_type).ref if content_type
+ encoder(type).response_parser
end
def self.encoder(name)