diff options
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 |