comparison mercurial/httpclient/tests/test_proxy_support.py @ 14341:5c3de67e7402

httpclient: import revision b8c3511a8cae from py-nonblocking-http Fixes issues with SSL_ERROR_WANT_READ incorrectly breaking the response read.
author Augie Fackler <durin42@gmail.com>
date Thu, 12 May 2011 10:48:31 -0500
parents 861f28212398
children a75e0f4ba0ab
comparison
equal deleted inserted replaced
14340:defa319d8bb7 14341:5c3de67e7402
95 'Server: BogusServer 1.0\r\n', 95 'Server: BogusServer 1.0\r\n',
96 'Content-Length: 10\r\n', 96 'Content-Length: 10\r\n',
97 '\r\n' 97 '\r\n'
98 '1234567890']) 98 '1234567890'])
99 con._connect() 99 con._connect()
100 con.sock.data = ['HTTP/1.1 200 OK\r\n', 100 con.sock.data.extend(['HTTP/1.1 200 OK\r\n',
101 'Server: BogusServer 1.0\r\n', 101 'Server: BogusServer 1.0\r\n',
102 'Content-Length: 10\r\n', 102 'Content-Length: 10\r\n',
103 '\r\n' 103 '\r\n'
104 '1234567890' 104 '1234567890'
105 ] 105 ])
106 con.request('GET', '/') 106 con.request('GET', '/')
107 107
108 expected_req = ('CONNECT 1.2.3.4:443 HTTP/1.0\r\n' 108 expected_req = ('CONNECT 1.2.3.4:443 HTTP/1.0\r\n'
109 'Host: 1.2.3.4\r\n' 109 'Host: 1.2.3.4\r\n'
110 'accept-encoding: identity\r\n' 110 'accept-encoding: identity\r\n'