End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
OpenURI::Meta#content_type
content_type
lib/open-uri.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/open-uri.rb, line 519
def content_type
type, *_ = content_type_parse
type || 'application/octet-stream'
end
returns “type/subtype” which is MIME Content-Type. It is downcased for canonicalization. Content-Type parameters are stripped.