Merge pull request #3 from channelcat/master

Update
This commit is contained in:
howie.hu 2018-01-10 09:23:43 +08:00 committed by GitHub
commit 5682d642a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)