mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-12-04 04:37:15 +00:00
Don't take minor version into account when checking serialized data compatiblity.
This commit is contained in:
parent
9febc0813f
commit
55f7e8d5b9
@ -790,6 +790,7 @@ class Response(HTTPMsg):
|
|||||||
cookies.append((cookie_name, (cookie_value, cookie_parameters)))
|
cookies.append((cookie_name, (cookie_value, cookie_parameters)))
|
||||||
return dict(cookies)
|
return dict(cookies)
|
||||||
|
|
||||||
|
|
||||||
class ClientDisconnect:
|
class ClientDisconnect:
|
||||||
"""
|
"""
|
||||||
A client disconnection event.
|
A client disconnection event.
|
||||||
@ -1654,7 +1655,7 @@ class FlowReader:
|
|||||||
try:
|
try:
|
||||||
while 1:
|
while 1:
|
||||||
data = tnetstring.load(self.fo)
|
data = tnetstring.load(self.fo)
|
||||||
if tuple(data["version"]) != version.IVERSION:
|
if tuple(data["version"][:1]) != version.IVERSION[:1]:
|
||||||
v = ".".join(str(i) for i in data["version"])
|
v = ".".join(str(i) for i in data["version"])
|
||||||
raise FlowReadError("Incompatible serialized data version: %s"%v)
|
raise FlowReadError("Incompatible serialized data version: %s"%v)
|
||||||
off = self.fo.tell()
|
off = self.fo.tell()
|
||||||
|
@ -88,7 +88,7 @@ class ServerConnection(tcp.TCPClient):
|
|||||||
def terminate(self):
|
def terminate(self):
|
||||||
try:
|
try:
|
||||||
self.wfile.flush()
|
self.wfile.flush()
|
||||||
except IOError:
|
except IOError: # pragma: no cover
|
||||||
pass
|
pass
|
||||||
try:
|
try:
|
||||||
self.connection.close()
|
self.connection.close()
|
||||||
|
Loading…
Reference in New Issue
Block a user