mirror of
https://github.com/vee1e/mitmproxy.git
synced 2026-09-05 12:17:21 +00:00
Make "~q" filter work more intuitively.
It now matches any flow that has no response.
This commit is contained in:
parent
2df9c52c09
commit
ddc9155c24
2 changed files with 5 additions and 6 deletions
|
|
@ -66,9 +66,10 @@ class FErr(_Action):
|
|||
|
||||
class FReq(_Action):
|
||||
code = "q"
|
||||
help = "Match request"
|
||||
help = "Match request with no response"
|
||||
def __call__(self, f):
|
||||
return True if f.request else False
|
||||
if not f.response:
|
||||
return True
|
||||
|
||||
|
||||
class FResp(_Action):
|
||||
|
|
|
|||
|
|
@ -135,8 +135,7 @@ class uMatching(libpry.AutoTree):
|
|||
s = self.resp()
|
||||
|
||||
assert self.q("~q", q)
|
||||
# FIXME
|
||||
assert self.q("~q", s)
|
||||
assert not self.q("~q", s)
|
||||
|
||||
assert not self.q("~s", q)
|
||||
assert self.q("~s", s)
|
||||
|
|
@ -226,8 +225,7 @@ class uMatching(libpry.AutoTree):
|
|||
assert self.q("~c 200 | ~h nohead", s)
|
||||
assert self.q("~c 201 | ~h head", s)
|
||||
assert not self.q("~c 201 | ~h nohead", s)
|
||||
# FIXME
|
||||
#assert self.q("(~c 201 | ~h nohead) | ~s", s)
|
||||
assert self.q("(~c 201 | ~h nohead) | ~s", s)
|
||||
|
||||
def test_not(self):
|
||||
s = self.resp()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue