fix stream handling
This commit is contained in:
parent
2b0258c13a
commit
2c3f50e34a
|
@ -177,8 +177,6 @@ class URLBuildError(ServerError):
|
||||||
|
|
||||||
|
|
||||||
class FileNotFound(NotFound):
|
class FileNotFound(NotFound):
|
||||||
pass
|
|
||||||
|
|
||||||
def __init__(self, message, path, relative_url):
|
def __init__(self, message, path, relative_url):
|
||||||
super().__init__(message)
|
super().__init__(message)
|
||||||
self.path = path
|
self.path = path
|
||||||
|
@ -208,8 +206,6 @@ class HeaderNotFound(InvalidUsage):
|
||||||
|
|
||||||
@add_status_code(416)
|
@add_status_code(416)
|
||||||
class ContentRangeError(SanicException):
|
class ContentRangeError(SanicException):
|
||||||
pass
|
|
||||||
|
|
||||||
def __init__(self, message, content_range):
|
def __init__(self, message, content_range):
|
||||||
super().__init__(message)
|
super().__init__(message)
|
||||||
self.headers = {
|
self.headers = {
|
||||||
|
|
|
@ -419,7 +419,7 @@ class Router:
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
handler = self.get(request)[0]
|
handler = self.get(request)[0]
|
||||||
except (NotFound, InvalidUsage):
|
except (NotFound, MethodNotSupported):
|
||||||
return False
|
return False
|
||||||
if (hasattr(handler, 'view_class') and
|
if (hasattr(handler, 'view_class') and
|
||||||
hasattr(handler.view_class, request.method.lower())):
|
hasattr(handler.view_class, request.method.lower())):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user