From 27b801ebe298b29f522ae1268330f7e2404b0212 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20W=C3=A4rting?= Date: Fri, 8 Jan 2016 16:02:27 +0100 Subject: [PATCH] Update redirect_requests.py replace http version with "HTTP/1.1" --- examples/redirect_requests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/redirect_requests.py b/examples/redirect_requests.py index 5cc816339..a31450832 100644 --- a/examples/redirect_requests.py +++ b/examples/redirect_requests.py @@ -12,11 +12,11 @@ def request(context, flow): # Method 1: Answer with a locally generated response if flow.request.pretty_host.endswith("example.com"): resp = HTTPResponse( - [1, 1], 200, "OK", + "HTTP/1.1", 200, "OK", Headers(Content_Type="text/html"), "helloworld") flow.reply(resp) # Method 2: Redirect the request to a different server if flow.request.pretty_host.endswith("example.org"): - flow.request.host = "mitmproxy.org" \ No newline at end of file + flow.request.host = "mitmproxy.org"