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