Module Atom::HTTPResponse
In: lib/atom/http.rb

Methods

Constants

HOP_BY_HOP = ['connection', 'keep-alive', 'proxy-authenticate', 'proxy-authorization', 'te', 'trailers', 'transfer-encoding', 'upgrade']

Public Instance methods

[Source]

# File lib/atom/http.rb, line 496
    def end2end_headers
      hopbyhop = HOP_BY_HOP
      if self['connection']
        hopbyhop += self['connection'].split(',').map { |x| x.strip }
      end
      @header.keys.reject { |x| hopbyhop.member? x.downcase }
    end

this should probably support ranges (eg. text/*)

[Source]

# File lib/atom/http.rb, line 486
    def validate_content_type( valid )
      raise Atom::HTTPException, "HTTP response contains no Content-Type!" if not self.content_type or self.content_type.empty?

      media_type = self.content_type.split(";").first

      unless valid.member? media_type.downcase
        raise Atom::WrongMimetype, "unexpected response Content-Type: #{media_type.inspect}. should be one of: #{valid.inspect}"
      end
    end

[Validate]