mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 10:16:27 +00:00
Py3: pathoc should send bytes over wire
This commit is contained in:
parent
500bf18023
commit
cd5ef042bb
@ -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…
Reference in New Issue
Block a user