        # File lib/em/protocols/header_and_content.rb, line 56
    56:       def receive_line line
    57:         case @hc_mode
    58:         when :discard_blanks
    59:           unless line == ""
    60:             @hc_mode = :headers
    61:             receive_line line
    62:           end
    63:         when :headers
    64:           if line == ""
    65:             raise "unrecognized state" unless @hc_headers.length > 0
    66:             if respond_to?(:receive_headers)
    67:               receive_headers @hc_headers
    68:             end
    69:             # @hc_content_length will be nil, not 0, if there was no content-length header.
    70:             if @hc_content_length.to_i > 0
    71:               set_binary_mode @hc_content_length
    72:             else
    73:               dispatch_request
    74:             end
    75:           else
    76:             @hc_headers << line
    77:             if ContentLengthPattern =~ line
    78:               # There are some attacks that rely on sending multiple content-length
    79:               # headers. This is a crude protection, but needs to become tunable.
    80:               raise "extraneous content-length header" if @hc_content_length
    81:               @hc_content_length = $1.to_i
    82:             end
    83:             if @hc_headers.length == 1 and respond_to?(:receive_first_header_line)
    84:               receive_first_header_line line
    85:             end
    86:           end
    87:         else
    88:           raise "internal error, unsupported mode"
    89:         end
    90:       end