diff --git a/sanic/server.py b/sanic/server.py index 729e1044..ec4e5780 100644 --- a/sanic/server.py +++ b/sanic/server.py @@ -114,11 +114,10 @@ class HttpProtocol(asyncio.Protocol): self.headers.append((name.decode(), value.decode('utf-8'))) def on_headers_complete(self): - ra = self.transport.get_extra_info('peername') if ra: self.headers.append(('Remote-Addr','%s:%s' % ra)) - + self.request = Request( url_bytes=self.url, headers=dict(self.headers),