docs: def parse(self, stream, full_statusline=None):
          """
          parse stream for status line and headers
          return a StatusAndHeaders object
  
          support continuation headers starting with space or tab
          """
  
          # status line w newlines intact
          if full_statusline is None:
              full_statusline = stream.readline()
  
          full_statusline = self.decode_header(full_statusline)
  
          statusline, total_read = _strip_count(full_statusline, 0)
  
          headers = []
  
          # at end of stream
          if total_read == 0:
              raise EOFError()
          elif not statusline:
              return StatusAndHeaders(statusline=statusline,
                                      headers=headers,
                                      protocol='',
                                      total_len=total_read)
  
          # validate only if verify is set
          if self.verify:
              protocol_status = self.split_prefix(statusline, self.statuslist)
  
              if not protocol_status:
                  msg = 'Expected Status Line starting with {0} - Found: {1}'
                  msg = msg.format(self.statuslist, statusline)
                  raise StatusAndHeadersParserException(msg, full_statusline)
          else:
              protocol_status = statusline.split(' ', 1)
  
          line, total_read = _strip_count(self.decode_header(stream.readline()), total_read)
          while line:
              result = line.split(':', 1)
              if len(result) == 2:
                  name = result[0].rstrip(' \t')
                  value = result[1].lstrip()
              else:
                  name = result[0]
                  value = None
  
              next_line, total_read = _strip_count(self.decode_header(stream.readline()),
                                                   total_read)
  
              # append continuation lines, if any
              while next_line and next_line.startswith((' ', '\t')):
                  if value is not None:
                      value += next_line
                  next_line, total_read = _strip_count(self.decode_header(stream.readline()),
                                                       total_read)
  
              if value is not None:
                  header = (name, value)
                  headers.append(header)
  
              line = next_line
  
          if len(protocol_status) > 1:
              statusline = protocol_status[1].strip()
          else:
              statusline = ''
  
          return StatusAndHeaders(statusline=statusline,
                                  headers=headers,
                                  protocol=protocol_status[0],
                                  total_len=total_read)