each_response_header(sock) private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/net/http.rb, line 2231
      def each_response_header(sock)
        key = value = nil
        while true
          line = sock.readuntil("\n", true).sub(/\s+\z/, '')
          break if line.empty?
          if line[0] == \s\ or line[0] == \t\ and value
            value << ' ' unless value.empty?
            value << line.strip
          else
            yield key, value if key
            key, value = line.strip.split(/\s*:\s*/, 2)
            raise HTTPBadResponse, 'wrong header line format' if value.nil?
          end
        end
        yield key, value if key
      end
Register or log in to add new notes.