Fix log_response to correctly output request ip and port

This commit is contained in:
bow 2018-01-09 13:47:01 +01:00
parent 9f559818e5
commit 4f8633375d

View File

@ -319,7 +319,8 @@ class HttpProtocol(asyncio.Protocol):
extra['host'] = 'UNKNOWN' extra['host'] = 'UNKNOWN'
if self.request is not None: if self.request is not None:
if self.request.ip: if self.request.ip:
extra['host'] = '{0[0]}:{0[1]}'.format(self.request.ip) extra['host'] = '{0}:{1}'.format(self.request.ip,
self.request.port)
extra['request'] = '{0} {1}'.format(self.request.method, extra['request'] = '{0} {1}'.format(self.request.method,
self.request.url) self.request.url)