mirror of
https://github.com/emmett-framework/granian.git
synced 2025-08-04 17:08:02 +00:00
Fixed incorrect parsing of ipv6 addresses in RSGI and WSGI access logs (#477)
This commit is contained in:
parent
a995402485
commit
ceab635fc2
2 changed files with 2 additions and 2 deletions
|
@ -107,7 +107,7 @@ def _build_access_logger(fmt):
|
|||
logger(
|
||||
t,
|
||||
{
|
||||
'addr_remote': scope.client.split(':')[0],
|
||||
'addr_remote': scope.client.rsplit(':', 1)[0],
|
||||
'protocol': 'HTTP/' + scope.http_version,
|
||||
'path': scope.path,
|
||||
'qs': scope.query_string,
|
||||
|
|
|
@ -80,7 +80,7 @@ def _build_access_logger(fmt):
|
|||
logger(
|
||||
t,
|
||||
{
|
||||
'addr_remote': scope['REMOTE_ADDR'].split(':')[0],
|
||||
'addr_remote': scope['REMOTE_ADDR'].rsplit(':', 1)[0],
|
||||
'protocol': scope['SERVER_PROTOCOL'],
|
||||
'path': scope['PATH_INFO'],
|
||||
'qs': scope['QUERY_STRING'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue