* Fixes#4416
Fix ValueError when splitting on a request URI without a path part.
* Fix mypy lintining issue
* Replace .split() with .partition() for cleaner code
Use original flow host instead of IP when exporting to curl/httpie.
Unless this is done, the SNI server name will not be sent, often making
the curl/httpie command have different behaviour than the original
request (most often in the form of failing to establish a TLS
connection).
With this change, we always use the original host, fixing this failure.
However, if the original host is a domain, it may sometimes resolve to
a different IP address later on. In curl, we solve this problem by
forcing it to connect to the original IP using `--resolve`. For httpie
there is currently no easy solution (see:
https://github.com/httpie/httpie/issues/414).
* Extract port from authority before IDNA decode
A UnicodeError exception may be raised if the port is present
* Update Changelog
* Test for badly formed byte input
* [#4235] Automatic view based on should_render method instead of content_types property
* [#4235] Update CHENGELOG
* [#4235] Fix linter warnings
* Add an explicit test for the new forward-compatible behaviour
* wip
* contentviews: introduce render_priority (2/2)
* coverage++, lint!
* minor fixes
Co-authored-by: Maximilian Hils <git@maximilianhils.com>
We previously defined the list of all allowed events in mitmproxy.eventsequence,
without specifying the expected arguments at all. This commit changes our addon
event dispatch to subclasses of MitmproxyEvent, which have well-defined attributes.
This greatly improves startup time as pyinstaller doesn't have to
unpack everything on startup. The same also applies to macOS and Linux,
but there we 1) don't have installers to hide all the files and
2) have a filesystem that deals much better with lots of small files.
Additionally, simplify cibuild to be a bit more reasonable.