From ce4253263c4dab4ded56140c4e4ff2351c047797 Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Thu, 23 Aug 2012 23:56:36 +0200 Subject: [PATCH] Do not special case http->ftp redirects. --- linkcheck/checker/httpurl.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/linkcheck/checker/httpurl.py b/linkcheck/checker/httpurl.py index 43caaddc..78ad7990 100644 --- a/linkcheck/checker/httpurl.py +++ b/linkcheck/checker/httpurl.py @@ -413,15 +413,8 @@ class HttpUrl (internpaturl.InternPatternUrl, proxysupport.ProxySupport): return -1 def check_redirection_newscheme (self, redirected, urlparts, set_result): - """Check for HTTP(S)/FTP redirection. Return True for HTTP(S) + """Check for HTTP(S)/FTP redirection. Return True for redirection with same scheme, else False.""" - if urlparts[0] == 'ftp': - msg = ("Redirection to URL `%(newurl)s' is not allowed.") % \ - {'newurl': redirected} - if set_result: - self.set_result(msg) - return False - raise LinkCheckerError(msg) if urlparts[0] != self.urlparts[0]: # changed scheme newobj = get_url_from(