class_docstr: Implements the HTTP/1.x protocol.
  
  This class can be on its own for clients, or via `HTTP1ServerConnection`
  for servers.
class_docstr_tok: ["Implements","the","HTTP\/1.x","protocol",".","This","class","can","be","on","its","own","for","clients",",","or","via","`","HTTP1ServerConnection","`","for","servers","."]
code: def _parse_headers(self, data):
      # The lstrip removes newlines that some implementations sometimes
      # insert between messages of a reused connection.  Per RFC 7230,
      # we SHOULD ignore at least one empty line before the request.
      # http://tools.ietf.org/html/rfc7230#section-3.5
      data = native_str(data.decode("latin1")).lstrip("\r\n")
      # RFC 7230 section allows for both CRLF and bare LF.
      eol = data.find("\n")
      start_line = data[:eol].rstrip("\r")
      try:
          headers = httputil.HTTPHeaders.parse(data[eol:])
      except ValueError:
          # probably form split() if there was no ':' in the line
          raise httputil.HTTPInputError(
              "Malformed HTTP headers: %r" % data[eol:100]
          )
      return start_line, headers
  
imports: from __future__ import absolute_import, division, print_function
  import re
  from tornado.concurrent import Future
  from tornado.escape import native_str, utf8
  from tornado import gen
  from tornado import httputil
  from tornado import iostream
  from tornado.log import gen_log, app_log
  from tornado import stack_context
  from tornado.util import GzipDecompressor, PY3
label_desc: Use image node_id 18 for calling the HTTP1Connection obj's underlying member method code with example usage: obj._parse_headers(data) and returns: start_line,  headers