to fix condition error that used in log_response
`request` class is derived from `dict`, so it will never be `True`.
This commit is contained in:
parent
5b06bcc57d
commit
4578f6016b
|
@ -311,7 +311,7 @@ class HttpProtocol(asyncio.Protocol):
|
|||
else:
|
||||
extra['byte'] = -1
|
||||
|
||||
if self.request:
|
||||
if self.request is not None:
|
||||
extra['host'] = '{0}:{1}'.format(self.request.ip[0],
|
||||
self.request.ip[1])
|
||||
extra['request'] = '{0} {1}'.format(self.request.method,
|
||||
|
|
Loading…
Reference in New Issue
Block a user