CORS middleware must return bytes

This commit is contained in:
Martin Zimmermann 2013-12-19 08:55:53 +01:00
parent 82da63a81b
commit 905bd63eee

View File

@ -77,7 +77,7 @@ class CORSMiddleware(object):
if environ.get("REQUEST_METHOD") == "OPTIONS": if environ.get("REQUEST_METHOD") == "OPTIONS":
add_cors_headers("200 Ok", [("Content-Type", "text/plain")]) add_cors_headers("200 Ok", [("Content-Type", "text/plain")])
return ['200 Ok'] return [b'200 Ok']
return self.app(environ, add_cors_headers) return self.app(environ, add_cors_headers)