Add raw header info to request object (#2032)

This commit is contained in:
Adam Hopkins
2021-03-03 16:33:34 +02:00
committed by GitHub
parent c41d7136e8
commit a733d32715
6 changed files with 57 additions and 15 deletions

View File

@@ -11,7 +11,7 @@ from urllib.parse import unquote
from sanic_routing.route import Route # type: ignore
from sanic.compat import stat_async
from sanic.constants import HTTP_METHODS
from sanic.constants import DEFAULT_HTTP_CONTENT_TYPE, HTTP_METHODS
from sanic.exceptions import (
ContentRangeError,
FileNotFound,
@@ -689,7 +689,7 @@ class RouteMixin:
content_type = (
content_type
or guess_type(file_path)[0]
or "application/octet-stream"
or DEFAULT_HTTP_CONTENT_TYPE
)
if "charset=" not in content_type and (