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,))
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, ))
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
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
def unpack_http_header(self, data): hs = header_set() hs.headers = unpack_http_header(self.inflate(data)) return hs