mirror of
https://github.com/vee1e/mitmproxy.git
synced 2026-09-02 10:47:14 +00:00
Py3: pathoc should send bytes over wire
This commit is contained in:
parent
500bf18023
commit
cd5ef042bb
2 changed files with 5 additions and 5 deletions
|
|
@ -241,8 +241,8 @@ class Pathoc(tcp.TCPClient):
|
|||
|
||||
def http_connect(self, connect_to):
|
||||
self.wfile.write(
|
||||
'CONNECT %s:%s HTTP/1.1\r\n' % tuple(connect_to) +
|
||||
'\r\n'
|
||||
b'CONNECT %s:%d HTTP/1.1\r\n' % (connect_to[0].encode(), connect_to[1]) +
|
||||
b'\r\n'
|
||||
)
|
||||
self.wfile.flush()
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@ class HTTPProtocol(object):
|
|||
"""
|
||||
|
||||
self.pathod_handler.wfile.write(
|
||||
'HTTP/1.1 200 Connection established\r\n' +
|
||||
('Proxy-agent: %s\r\n' % version.PATHOD) +
|
||||
'\r\n'
|
||||
b'HTTP/1.1 200 Connection established\r\n' +
|
||||
(b'Proxy-agent: %s\r\n' % version.PATHOD.encode()) +
|
||||
b'\r\n'
|
||||
)
|
||||
self.pathod_handler.wfile.flush()
|
||||
if not self.pathod_handler.server.ssloptions.not_after_connect:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue