Reverting
This commit is contained in:
parent
ec10d24ac6
commit
dbd11bf387
@ -111,7 +111,7 @@ class Sanic:
|
|||||||
if not response:
|
if not response:
|
||||||
# Fetch handler from router
|
# Fetch handler from router
|
||||||
handler, args, kwargs = self.router.get(request)
|
handler, args, kwargs = self.router.get(request)
|
||||||
if not handler:
|
if handler is None:
|
||||||
raise ServerError("'None' was returned while requesting a handler from the router")
|
raise ServerError("'None' was returned while requesting a handler from the router")
|
||||||
|
|
||||||
# Run response handler
|
# Run response handler
|
||||||
|
@ -25,7 +25,7 @@ class HttpProtocol(asyncio.Protocol):
|
|||||||
self.loop = loop
|
self.loop = loop
|
||||||
self.transport = None
|
self.transport = None
|
||||||
self.request = None
|
self.request = None
|
||||||
self.parser = False
|
self.parser = None
|
||||||
self.url = None
|
self.url = None
|
||||||
self.headers = None
|
self.headers = None
|
||||||
self.signal = signal
|
self.signal = signal
|
||||||
@ -64,7 +64,8 @@ class HttpProtocol(asyncio.Protocol):
|
|||||||
return self.bail_out("Request too large ({}), connection closed".format(self._total_request_size))
|
return self.bail_out("Request too large ({}), connection closed".format(self._total_request_size))
|
||||||
|
|
||||||
# Create parser if this is the first time we're receiving data
|
# Create parser if this is the first time we're receiving data
|
||||||
if not self.parser:
|
if self.parser is None:
|
||||||
|
assert self.request is None
|
||||||
self.headers = []
|
self.headers = []
|
||||||
self.parser = httptools.HttpRequestParser(self)
|
self.parser = httptools.HttpRequestParser(self)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user