diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/test_protocol_http.py | 6 | ||||
-rw-r--r-- | test/tutils.py | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/test/test_protocol_http.py b/test/test_protocol_http.py index 451b7b5d..3b922c06 100644 --- a/test/test_protocol_http.py +++ b/test/test_protocol_http.py @@ -141,6 +141,12 @@ class TestProxyChainingSSL(tservers.HTTPChainProxyTest): finally: self.chain[0].tmaster.handle_request = _handle_request + def test_sni(self): + p = self.pathoc(sni="foo.com") + req = p.request("get:'/p/418:b\"content\"'") + assert req.content == "content" + assert req.status_code == 418 + class TestProxyChainingSSLReconnect(tservers.HTTPChainProxyTest): ssl = True diff --git a/test/tutils.py b/test/tutils.py index c527a64a..dc049adb 100644 --- a/test/tutils.py +++ b/test/tutils.py @@ -33,6 +33,7 @@ def tclient_conn(): def tserver_conn(): c = ServerConnection._from_state(dict( address=dict(address=("address", 22), use_ipv6=True), + state=[], source_address=dict(address=("address", 22), use_ipv6=True), cert=None )) @@ -72,6 +73,7 @@ def tresp(req=None, content="message"): cert = certutils.SSLCert.from_der(file(test_data.path("data/dercert"), "rb").read()) f.server_conn = ServerConnection._from_state(dict( address=dict(address=("address", 22), use_ipv6=True), + state=[], source_address=None, cert=cert.to_pem())) f.response = http.HTTPResponse((1, 1), 200, "OK", headers, content, time(), time()) |