From 8e8eba71dc91b093cf91baeb5e3549e396f281f2 Mon Sep 17 00:00:00 2001 From: calvin Date: Fri, 27 Aug 2004 15:32:40 +0000 Subject: [PATCH] print redirection info git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@1544 e7d03fd6-7b0d-0410-9947-9c21f3af8025 --- linkcheck/checker/httpurl.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linkcheck/checker/httpurl.py b/linkcheck/checker/httpurl.py index 892c4a44..20fa7452 100644 --- a/linkcheck/checker/httpurl.py +++ b/linkcheck/checker/httpurl.py @@ -153,7 +153,6 @@ class HttpUrl (urlbase.UrlBase, proxysupport.ProxySupport): response = self._get_http_response() self.headers = response.msg self.proxy, self.proxyauth = oldproxy - linkcheck.log.debug(linkcheck.LOG_CHECK, "follow all redirections") tries, response = \ self.follow_redirections(response, redirect_cache) if tries == -1: @@ -212,6 +211,7 @@ class HttpUrl (urlbase.UrlBase, proxysupport.ProxySupport): def follow_redirections (self, response, redirect_cache): """follow all redirections of http response""" + linkcheck.log.debug(linkcheck.LOG_CHECK, "follow all redirections") redirected = self.url tries = 0 while response.status in [301, 302] and self.headers and \ @@ -220,6 +220,7 @@ class HttpUrl (urlbase.UrlBase, proxysupport.ProxySupport): self.headers.getheader("Uri", "")) redirected = linkcheck.url.url_norm( urlparse.urljoin(redirected, newurl)) + self.add_info(_("Redirected to %(url)s") % {'url': redirected}) linkcheck.log.debug(linkcheck.LOG_CHECK, "Redirected to %r", redirected) # note: urlparts has to be a list