From d29febdb28fb87b3e487a2d5d3e4127020b34881 Mon Sep 17 00:00:00 2001 From: benoitc Date: Sat, 29 Jun 2013 05:22:27 +0200 Subject: [PATCH] fix "Expect: continue-100" support on python 3 only bytes should be passed to the socket. fix #560 --- gunicorn/http/wsgi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gunicorn/http/wsgi.py b/gunicorn/http/wsgi.py index 67c5d90b..73cadba1 100644 --- a/gunicorn/http/wsgi.py +++ b/gunicorn/http/wsgi.py @@ -97,7 +97,7 @@ def create(req, sock, client, server, cfg): if hdr_name == "EXPECT": # handle expect if hdr_value.lower() == "100-continue": - sock.send("HTTP/1.1 100 Continue\r\n\r\n") + sock.send(b"HTTP/1.1 100 Continue\r\n\r\n") elif x_forwarded_for_header and hdr_name == x_forwarded_for_header: forward = hdr_value elif secure_headers and (hdr_name.upper() in secure_headers and