Update variable name
Give `ra` a more explicit name
This commit is contained in:
parent
8ebc92c236
commit
28ce2447ef
|
@ -114,9 +114,9 @@ class HttpProtocol(asyncio.Protocol):
|
||||||
self.headers.append((name.decode(), value.decode('utf-8')))
|
self.headers.append((name.decode(), value.decode('utf-8')))
|
||||||
|
|
||||||
def on_headers_complete(self):
|
def on_headers_complete(self):
|
||||||
ra = self.transport.get_extra_info('peername')
|
remote_addr = self.transport.get_extra_info('peername')
|
||||||
if ra:
|
if remote_addr:
|
||||||
self.headers.append(('Remote-Addr', '%s:%s' % ra))
|
self.headers.append(('Remote-Addr', '%s:%s' % remote_addr))
|
||||||
|
|
||||||
self.request = Request(
|
self.request = Request(
|
||||||
url_bytes=self.url,
|
url_bytes=self.url,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user