* [#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>
This commit replaces our WSGI implementation with a new ASGI one,
which then uses `asgiref`'s compatibility mode to still support WSGI applications.
The ASGI implementation is a bit bare-bone, but good enough for our purposes.
The major changes are:
- We now support ASGI apps.
- Instead of taking connections out of mitmproxy's normal processing,
we now just set flow.response and let things continue as usual.
This allows users to see responses in mitmproxy, use the response hook
to modify app responses, etc. Also important for us,
this makes the new implementation work for shenanigans like sans-io.
This allow's trailers without the initial Trailer header announcement. In HTTP/2 the stream ends with any frame containing END_SREAM. In the case of trailers, it is a final HEADERS frame after all the DATA frames. Therefore we do not need to explicitly check for the trailer announcement header, but can simply wait until the response message / stream has ended.
- restructure examples (fix#4031)
- remove example dependencies from setup.py,
we do not need special dependencies for our supported addons.
- unify how we generate docs from code
- improve example docs
This patch does a lot.
- Ditch sphinx in favor of hugo. This gives us complete control of the layout
and presentation of our docs. Henceforth, docs will be hosted on our website
rather than ReadTheDocs.
- Create a simple, clean doc layout and theme.
- Remove large parts of the documentaion. I've ditched anything that was a)
woefully out of date, b) too detailed, or c) too hard to maintain in the long
term.
- Huge updates to the docs themselves: completely rewrite addons documentation,
add docs for core concepts like commands and options, and revise and tweak a
lot of the existing docs.
With this patch, we're also changing the way we publish and maintain the docs.
From now on, we don't publish docs for every release. Instead, the website will
contain ONE set of docs for each major release. The online docs will be updated
if needed as minor releases are made. Docs are free to improve during minor
releases, but anything that changes behaviour sufficiently to require a doc
change warrants a new major release. This also leaves us free to progressively
update and improve docs out of step with our release cadence.
With this new scheme, I feel CI over the docs is less important. I've removed
it for now, but won't object if someone wants to add it back in.