We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 705e7c0 + 179976f commit 3473e27Copy full SHA for 3473e27
lib/net/http/header.rb
@@ -699,10 +699,14 @@ def range_length
699
# res.content_type # => "application/json"
700
#
701
def content_type
702
- return nil unless main_type()
703
- if sub_type()
704
- then "#{main_type()}/#{sub_type()}"
705
- else main_type()
+ main = main_type()
+ return nil unless main
+
+ sub = sub_type()
706
+ if sub
707
+ "#{main}/#{sub}"
708
+ else
709
+ main
710
end
711
712
0 commit comments