diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-02-10 15:31:45 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-02-10 15:31:45 +1300 |
commit | 1ad7e9152736251203cd9c57c6af3e19a2f7ad8a (patch) | |
tree | 48b249d04d4b44486c40518d2e8ea2bd42e89328 /libmproxy | |
parent | 5f785e26b9b863d5ab340e0299ae31753cc84dfb (diff) | |
download | mitmproxy-1ad7e9152736251203cd9c57c6af3e19a2f7ad8a.tar.gz mitmproxy-1ad7e9152736251203cd9c57c6af3e19a2f7ad8a.tar.bz2 mitmproxy-1ad7e9152736251203cd9c57c6af3e19a2f7ad8a.zip |
Make filter matching act more sensibly.
Diffstat (limited to 'libmproxy')
-rw-r--r-- | libmproxy/flow.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libmproxy/flow.py b/libmproxy/flow.py index 2499db4e..2b371180 100644 --- a/libmproxy/flow.py +++ b/libmproxy/flow.py @@ -932,12 +932,14 @@ class Flow: if matched, False if not. """ if f: - if self.response: - return f(self.response) - elif self.request: - return f(self.request) - elif self.error: - return f(self.error) + if self.response and f(self.response): + return True + elif self.request and f(self.request): + return True + elif self.error and f(self.error): + return True + else: + return False else: return True |