End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
OpenURI::Meta#content_encoding
content_encoding
lib/open-uri.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/open-uri.rb, line 556
def content_encoding
vs = @metas['content-encoding']
if vs && %r{\A#{RE_LWS}?#{RE_TOKEN}#{RE_LWS}?(?:,#{RE_LWS}?#{RE_TOKEN}#{RE_LWS}?)*}o =~ (v = vs.join(', '))
v.scan(RE_TOKEN).map {|content_coding| content_coding.downcase}
else
[]
end
end
Returns a list of encodings in Content-Encoding field as an array of strings.
The encodings are downcased for canonicalization.