Use write_response
This commit is contained in:
parent
c01cbb3a8c
commit
0bd61f6a57
|
@ -86,10 +86,7 @@ class HttpProtocol(asyncio.Protocol):
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
response = HTTPResponse(
|
response = HTTPResponse(
|
||||||
'Request Timeout', RequestTimeout.status_code)
|
'Request Timeout', RequestTimeout.status_code)
|
||||||
self.transport.write(
|
self.write_response(response)
|
||||||
response.output(
|
|
||||||
self.request.version, False, self.request_timeout))
|
|
||||||
self.transport.close()
|
|
||||||
|
|
||||||
# -------------------------------------------- #
|
# -------------------------------------------- #
|
||||||
# Parsing
|
# Parsing
|
||||||
|
|
Loading…
Reference in New Issue
Block a user