mirror of
https://github.com/vee1e/mitmproxy.git
synced 2026-09-01 18:27:18 +00:00
* Treat carriage return as whitespace in strutils.is_xml is_xml() skipped only tab, LF and space before checking for the opening "<", so a response body that started with a leading CR or CRLF (which is what HTTP frames look like, and what some Windows-side XML producers emit) was not detected as XML. The XML/HTML content view's auto-detection score then dropped to 0 instead of the usual 0.4 for those bodies. XML 1.0 §2.3 defines whitespace as (#x20 | #x9 | #xD | #xA), so \r (0x0D) belongs in the skip set alongside the other three. Adds the missing byte plus three assertions in the existing test_is_xml: \r<foo and \r\n<foo are now recognised, and a sanity check that \r\nfoo is still rejected. * [autofix.ci] apply automated fixes * simplify wording --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Maximilian Hils <git@maximilianhils.com> |
||
|---|---|---|
| .. | ||
| addons | ||
| contentviews | ||
| contrib | ||
| coretypes | ||
| io | ||
| net | ||
| platform | ||
| proxy | ||
| script | ||
| test | ||
| tools | ||
| utils | ||
| __init__.py | ||
| addonmanager.py | ||
| certs.py | ||
| command.py | ||
| command_lexer.py | ||
| connection.py | ||
| ctx.py | ||
| dns.py | ||
| eventsequence.py | ||
| exceptions.py | ||
| flow.py | ||
| flowfilter.py | ||
| hooks.py | ||
| http.py | ||
| log.py | ||
| master.py | ||
| options.py | ||
| optmanager.py | ||
| py.typed | ||
| tcp.py | ||
| tls.py | ||
| types.py | ||
| udp.py | ||
| version.py | ||
| websocket.py | ||