Module | Atom::HTTPResponse |
In: |
lib/atom/http.rb
|
this should probably support ranges (eg. text/*)
# File lib/atom/http.rb, line 319 319: def validate_content_type( valid ) 320: raise Atom::HTTPException, "HTTP response contains no Content-Type!" unless self.content_type 321: 322: media_type = self.content_type.split(";").first 323: 324: unless valid.member? media_type.downcase 325: raise Atom::WrongMimetype, "unexpected response Content-Type: #{media_type.inspect}. should be one of: #{valid.inspect}" 326: end 327: end