From 7cbd13489f4368228b00f99827e9ee6b4aa107c6 Mon Sep 17 00:00:00 2001 From: Yaniv Hadad Date: Sat, 19 Jul 2014 18:34:22 +0200 Subject: [PATCH] add final_url to HttpResponse --- aiohttp/client.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aiohttp/client.py b/aiohttp/client.py index c4f94246764..2f9d8b2dca8 100644 --- a/aiohttp/client.py +++ b/aiohttp/client.py @@ -108,6 +108,8 @@ def request(method, url, *, conn = yield from connector.connect(req) resp = req.send(conn.writer, conn.reader) + resp.final_url = url + try: yield from resp.start(conn, read_until_eof) except: @@ -550,6 +552,7 @@ def __init__(self, method, url, host='', *, writer=None, continue100=None): self.method = method self.url = url + self.final_url = None self.host = host self.headers = None self._content = None