Merge pull request #1654 from huge-success/asgi-content-type

Add content-type headers in response in ASGI mode
This commit is contained in:
7
2019-08-13 12:30:40 -07:00
committed by GitHub
2 changed files with 30 additions and 1 deletions

View File

@@ -327,6 +327,11 @@ class ASGIApp:
(b"content-length", str(len(response.body)).encode("latin-1"))
]
if "content-type" not in response.headers:
headers += [
(b"content-type", str(response.content_type).encode("latin-1"))
]
if response.cookies:
cookies.update(
{