mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 08:11:00 +00:00
Keep blank query values for flow hashing
This commit is contained in:
parent
41a1a0bef3
commit
6a24a4e3c5
@ -232,7 +232,7 @@ class ServerPlaybackState:
|
|||||||
r = flow.request
|
r = flow.request
|
||||||
|
|
||||||
_, _, path, _, query, _ = urlparse.urlparse(r.url)
|
_, _, path, _, query, _ = urlparse.urlparse(r.url)
|
||||||
queriesArray = urlparse.parse_qsl(query)
|
queriesArray = urlparse.parse_qsl(query, keep_blank_values=True)
|
||||||
|
|
||||||
key = [
|
key = [
|
||||||
str(r.port),
|
str(r.port),
|
||||||
|
@ -125,6 +125,10 @@ class TestServerPlaybackState:
|
|||||||
r.request.path = "voing"
|
r.request.path = "voing"
|
||||||
assert s._hash(r) != s._hash(r2)
|
assert s._hash(r) != s._hash(r2)
|
||||||
|
|
||||||
|
r.request.path = "path?blank_value"
|
||||||
|
r2.request.path = "path?"
|
||||||
|
assert s._hash(r) != s._hash(r2)
|
||||||
|
|
||||||
def test_headers(self):
|
def test_headers(self):
|
||||||
s = flow.ServerPlaybackState(["foo"], [], False, False, None, False, None, False)
|
s = flow.ServerPlaybackState(["foo"], [], False, False, None, False, None, False)
|
||||||
r = tutils.tflow(resp=True)
|
r = tutils.tflow(resp=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user