예제 #1
0
파일: bounce.py 프로젝트: mailgun/flanker
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
예제 #2
0
파일: bounce.py 프로젝트: gerry-sabar/mayan
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
예제 #3
0
파일: headers.py 프로젝트: rcharp/airform
 def from_stream(cls, stream):
     """
     Takes a stream and reads the headers, decodes headers to unicode dict
     like object.
     """
     return cls(parse_stream(stream))
예제 #4
0
def collect_from_status(body):
    out = deque()
    with closing(StringIO(body)) as stream:
        for i in xrange(3):
            out += parse_stream(stream)
    return out
예제 #5
0
def collect_from_status(body):
    out = deque()
    with closing(StringIO(body)) as stream:
        for i in xrange(3):
            out += parse_stream(stream)
    return out