From b0d9967fdafa38fdf7875a4b8f43d10e97c6f4f7 Mon Sep 17 00:00:00 2001 From: mkaay Date: Mon, 16 Nov 2009 17:43:33 +0100 Subject: added lastEffectiveURL --- module/network/Request.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/module/network/Request.py b/module/network/Request.py index eb67da95d..9f27af4ec 100755 --- a/module/network/Request.py +++ b/module/network/Request.py @@ -47,6 +47,7 @@ class Request: self.abort = False + self.lastEffectiveURL = None self.lastURL = None self.auth = False @@ -138,6 +139,7 @@ class Request: self.pycurl.perform() + self.lastEffectiveURL = self.pycurl.getinfo(pycurl.EFFECTIVE_URL) self.lastURL = url header = self.get_header() @@ -165,6 +167,7 @@ class Request: if rep.headers["content-encoding"] == "gzip": output = GzipFile('', 'r', 0, StringIO(output)).read() + self.lastEffectiveURL = rep.geturl() self.lastURL = url return output -- cgit v1.2.3