From 8faf37bfbf99d9070a95cd4363386dcc560ab2fe Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Wed, 16 Mar 2016 09:49:09 -0300 Subject: [PATCH] Fix type of cookie header string --- channels/handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/channels/handler.py b/channels/handler.py index 8c2f61d..15c8d13 100644 --- a/channels/handler.py +++ b/channels/handler.py @@ -235,7 +235,7 @@ class AsgiHandler(base.BaseHandler): for c in response.cookies.values(): response_headers.append( ( - 'Set-Cookie', + b'Set-Cookie', c.output(header='').encode("ascii"), ) )