Merge pull request #1654 from huge-success/asgi-content-type
Add content-type headers in response in ASGI mode
This commit is contained in:
@@ -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(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user