def _collect_headers_from_status(body): out = deque() with closing(six.StringIO(body)) as stream: for i in range(3): out += parse_stream(stream) return out
def from_stream(cls, stream): """ Takes a stream and reads the headers, decodes headers to unicode dict like object. """ return cls(parse_stream(stream))
def collect_from_status(body): out = deque() with closing(StringIO(body)) as stream: for i in xrange(3): out += parse_stream(stream) return out