mitmproxy/examples/fail_with_500.py
Jason Pepas b174fd5e1f Adding example which turns every reponse into an HTTP 500. (#1136)
* Adding example which turns every reponse into an HTTP 500.

* Prefer b"" over None for response.content.
2016-05-11 15:26:17 -06:00

4 lines
97 B
Python

def response(context, flow):
flow.response.status_code = 500
flow.response.content = b""