Пример #1
0
def t0():
    c = http_client ('127.0.0.1', 80)
    h = header_set()
    l = [c.send_request ('GET', '/postgresql/html/', h, content=None, force=True) for x in range (10)]
    for req in l:
        req.wait()
        W ('%s\n' % (req.response,))
Пример #2
0
def t0():
    c = http_client('127.0.0.1', 80)
    h = header_set()
    l = [
        c.send_request('GET', '/postgresql/html/', h, content=None, force=True)
        for x in range(10)
    ]
    for req in l:
        req.wait()
        W('%s\n' % (req.response, ))
Пример #3
0
def t0():
    global ctx, s, c
    # ctx = coro.ssl.new_ctx (proto='tlsv1', next_protos=['spdy/2', 'http/1.1'])
    s = coro.ssl.sock(ctx)
    c = spdy_client('127.0.0.1', 9443, s)
    W('negotiated: %r\n' % (s.ssl.get_next_protos_negotiated(), ))
    h = header_set()
    req = c.send_request('GET', '/status', h, content=None, force=True)
    req.wait()
    W('%s\n' % (req.response, ))
    print repr(req.rfile.read())
    return req
Пример #4
0
def t0():
    global ctx, s, c
    # ctx = coro.ssl.new_ctx (proto='tlsv1', next_protos=['spdy/2', 'http/1.1'])
    s = coro.ssl.sock (ctx)
    c = spdy_client ('127.0.0.1', 9443, s)
    W ('negotiated: %r\n' % (s.ssl.get_next_protos_negotiated(),))
    h = header_set()
    req = c.send_request ('GET', '/status', h, content=None, force=True)
    req.wait()
    W ('%s\n' % (req.response,))
    print repr(req.rfile.read())
    return req
Пример #5
0
 def unpack_http_header(self, data):
     hs = header_set()
     hs.headers = unpack_http_header(self.inflate(data))
     return hs
Пример #6
0
 def unpack_http_header(self, data):
     hs = header_set()
     hs.headers = unpack_http_header(self.inflate(data))
     return hs