You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's inconsistent behavior between mitmweb and mitmproxy for filters.
When there're both HTTP flows and other flows recorded, we can use header filter alone in mitmproxy terminal, but have to add ~http filter before ~hq in mitmweb.
I debugged and it turned out that DNS flows are passed to match_header()
according to these fields: authoritative_answer, recursion_desired etc. this is a DNSMessage, which has no headers, and filter expression is cleared with error raised:
TypeError: Cannot read properties of undefined (reading 'length')
at ResponseUtils.match_header (http://127.0.0.1:8081/static/app.js:62:5954)
at responseHeaderFilter (http://127.0.0.1:8081/static/app.js:64:13978)
at http://127.0.0.1:8081/static/app.js:65:49926
...
I think the behavior of mitmproxy terminal makes more sense and more easy to use.
Problem Description
There's inconsistent behavior between mitmweb and mitmproxy for filters.
When there're both HTTP flows and other flows recorded, we can use header filter alone in mitmproxy terminal, but have to add
~http
filter before~hq
in mitmweb.I debugged and it turned out that DNS flows are passed to
match_header()
according to these fields:
authoritative_answer
,recursion_desired
etc. this is aDNSMessage
, which has noheaders
, and filter expression is cleared with error raised:I think the behavior of mitmproxy terminal makes more sense and more easy to use.
related issue: #6168
Steps to reproduce the behavior:
mitmweb -r <http_and_other_flows>
~hq x
or~hs
(header filter)~http & ~hq x
~http
filterSystem Information
The text was updated successfully, but these errors were encountered: