diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-07-02 02:01:46 -0700 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-07-02 02:01:46 -0700 |
commit | dbf7cb1a442e2c0823d853ca310395048496996d (patch) | |
tree | 2e6fa840f1b4f41f8a348a21569ddedf4a213668 /examples/redirect_requests.py | |
parent | 6032c4f2352260d32032800a2ff694339e2af6b2 (diff) | |
download | mitmproxy-dbf7cb1a442e2c0823d853ca310395048496996d.tar.gz mitmproxy-dbf7cb1a442e2c0823d853ca310395048496996d.tar.bz2 mitmproxy-dbf7cb1a442e2c0823d853ca310395048496996d.zip |
update examples: no decoded() anymore :tada:
Diffstat (limited to 'examples/redirect_requests.py')
-rw-r--r-- | examples/redirect_requests.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/redirect_requests.py b/examples/redirect_requests.py index d7db3f1c..bb1e6952 100644 --- a/examples/redirect_requests.py +++ b/examples/redirect_requests.py @@ -13,9 +13,9 @@ def request(context, flow): # Method 1: Answer with a locally generated response if flow.request.pretty_host.endswith("example.com"): resp = HTTPResponse( - "HTTP/1.1", 200, "OK", + b"HTTP/1.1", 200, b"OK", Headers(Content_Type="text/html"), - "helloworld") + b"helloworld") flow.reply.send(resp) # Method 2: Redirect the request to a different server |