Use write_response

This commit is contained in:
38elements 2016-11-26 14:14:30 +09:00
parent c01cbb3a8c
commit 0bd61f6a57

View File

@ -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