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> |
||
|---|---|---|
| .. | ||
| bench | ||
| examples | ||
| helper_tools | ||
| mitmproxy | ||
| wg-test-client | ||
| __init__.py | ||
| conftest.py | ||
| filename_matching.py | ||
| individual_coverage.py | ||
| run-tests-offline.sh | ||