Keep blank query values for flow hashing

This commit is contained in:
Terry Long 2015-04-02 22:10:01 -07:00
parent 41a1a0bef3
commit 6a24a4e3c5
2 changed files with 10 additions and 6 deletions

View File

@ -232,7 +232,7 @@ class ServerPlaybackState:
r = flow.request
_, _, path, _, query, _ = urlparse.urlparse(r.url)
queriesArray = urlparse.parse_qsl(query)
queriesArray = urlparse.parse_qsl(query, keep_blank_values=True)
key = [
str(r.port),

View File

@ -125,6 +125,10 @@ class TestServerPlaybackState:
r.request.path = "voing"
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):
s = flow.ServerPlaybackState(["foo"], [], False, False, None, False, None, False)
r = tutils.tflow(resp=True)