From 2cefdcd65b67d03ad090847269a241ad6b4196da Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stefan=20K=C3=B6gl?= Date: Tue, 11 Jan 2011 11:00:09 +0200 Subject: [PATCH] include requested URL "as-is" in response Helpful for matching response-objects to requested URLs --- feedservice/urls.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/feedservice/urls.py b/feedservice/urls.py index 211ceb5..69e67b2 100644 --- a/feedservice/urls.py +++ b/feedservice/urls.py @@ -18,7 +18,14 @@ def get_redirects(url): collector.urls.append(url) opener = urllib2.build_opener(collector) opener.open(url) - return map(basic_sanitizing, collector.urls) + urls = map(basic_sanitizing, collector.urls) + + # include un-sanitized URL for easy matching of + #response to request URLs + if urls[0] != url: + urls = [url] + urls + + return urls def basic_sanitizing(url): -- 2.11.4.GIT