* Fix `KeyError: 'Unknown options: hardump'` in HAR test_simple
The reason was an invalid import of `connections` which is gone
in d159897d98, but the loading error
was silently ignored (#4438) resulting in a misleading exception
at a later stage.
This still doesn't make the test suite run, because it is better
to fix one error at a time.
The way to run tests from examples.
ln -sr test/conftest.py examples
pytest examples/contrib/test_har_dump.py -k simpl
The way to see the execution flow with silenced exceptions.
from hunter import trace, Q
trace(Q(stdlib=False), ~Q(filename_contains='site-packages'))
* Fix `TypeError: invoke() takes 3 positional arguments but 4 were given`
* Fix `TypeError: 'bool' object is not callable`
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).
To run the test, I had to copy `conftest.py` to examples.
cp test/conftest.py examples
pytest examples/contrib/test_har_dump.py
This fixes the `fixture 'tdata' not found` error.
* 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
Our dev.sh/dev.ps1 scripts feel like an unnecessary layer of abstraction.
The revised docs make the install process transparent to experienced users,
and can also be easily reused for other projects (hi, pdoc!).
* [#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>
Else the user sees
```
--replace is deprecated.
Please use `--replacements` instead.
mitmdump: error: unrecognized arguments: --replace
```
and then
```
mitmdump: error: unrecognized arguments: --replacements
--replacements is deprecated.
Please use `--modify-body` or `--modify-headers` instead.
```
and feels silly
it turns out pull requests from trusted contributors do have access to secrets,
so we can't do that check. Checking for the repo only doesn't make much sense.