From: Georg Brandl Date: Wed, 5 Nov 2014 21:17:29 +0000 (+0100) Subject: merge with 3.4 X-Git-Tag: v3.5.0a1~515 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dca213dd776c3b30330279f7b93c99c863b044d2;p=python merge with 3.4 --- dca213dd776c3b30330279f7b93c99c863b044d2 diff --cc Lib/test/test_httplib.py index 8142c0e449,d259fb2853..93c2212b6e --- a/Lib/test/test_httplib.py +++ b/Lib/test/test_httplib.py @@@ -15,29 -15,9 +15,29 @@@ here = os.path.dirname(__file__ CERT_localhost = os.path.join(here, 'keycert.pem') # Self-signed cert file for 'fakehostname' CERT_fakehostname = os.path.join(here, 'keycert2.pem') - # Root cert file (CA) for svn.python.org's cert - CACERT_svn_python_org = os.path.join(here, 'https_svn_python_org_root.pem') + # Self-signed cert file for self-signed.pythontest.net + CERT_selfsigned_pythontestdotnet = os.path.join(here, 'selfsigned_pythontestdotnet.pem') +# constants for testing chunked encoding +chunked_start = ( + 'HTTP/1.1 200 OK\r\n' + 'Transfer-Encoding: chunked\r\n\r\n' + 'a\r\n' + 'hello worl\r\n' + '3\r\n' + 'd! \r\n' + '8\r\n' + 'and now \r\n' + '22\r\n' + 'for something completely different\r\n' +) +chunked_expected = b'hello world! and now for something completely different' +chunk_extension = ";foo=bar" +last_chunk = "0\r\n" +last_chunk_extended = "0" + chunk_extension + "\r\n" +trailers = "X-Dummy: foo\r\nX-Dumm2: bar\r\n" +chunked_end = "\r\n" + HOST = support.HOST class FakeSocket: