diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-07-15 23:17:57 -0700 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-07-15 23:17:57 -0700 |
commit | 3602fd7a36d963311339ab11ed36ff00df860f71 (patch) | |
tree | 5834a98b35c02639c876544bc645f205068fac99 /examples/redirect_requests.py | |
parent | a3c7c84d49c3e6563e7f37ef60c989f99ed96788 (diff) | |
parent | 17305643bc482c0b185eec5c64d506790cd26587 (diff) | |
download | mitmproxy-3602fd7a36d963311339ab11ed36ff00df860f71.tar.gz mitmproxy-3602fd7a36d963311339ab11ed36ff00df860f71.tar.bz2 mitmproxy-3602fd7a36d963311339ab11ed36ff00df860f71.zip |
Merge remote-tracking branch 'origin/master' into message-body-encoding
Diffstat (limited to 'examples/redirect_requests.py')
-rw-r--r-- | examples/redirect_requests.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/redirect_requests.py b/examples/redirect_requests.py index bb1e6952..36594bcd 100644 --- a/examples/redirect_requests.py +++ b/examples/redirect_requests.py @@ -5,7 +5,7 @@ from mitmproxy.models import HTTPResponse from netlib.http import Headers -def request(context, flow): +def request(flow): # pretty_host takes the "Host" header of the request into account, # which is useful in transparent mode where we usually only have the IP # otherwise. @@ -15,7 +15,8 @@ def request(context, flow): resp = HTTPResponse( b"HTTP/1.1", 200, b"OK", Headers(Content_Type="text/html"), - b"helloworld") + b"helloworld" + ) flow.reply.send(resp) # Method 2: Redirect the request to a different server |