mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-23 07:34:44 +00:00
ensure unicode for redirects
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@1916 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
437b56c9ad
commit
2ba4a50965
1 changed files with 2 additions and 0 deletions
|
|
@ -230,6 +230,8 @@ class HttpUrl (urlbase.UrlBase, proxysupport.ProxySupport):
|
|||
self.headers.getheader("Uri", ""))
|
||||
redirected = linkcheck.url.url_norm(
|
||||
urlparse.urljoin(redirected, newurl))
|
||||
if not isinstance(redirected, unicode):
|
||||
redirected = unicode(redirected, "iso8859-1", "ignore")
|
||||
self.add_info(_("Redirected to %(url)s") % {'url': redirected})
|
||||
linkcheck.log.debug(linkcheck.LOG_CHECK, "Redirected to %r",
|
||||
redirected)
|
||||
|
|
|
|||
Loading…
Reference in a new issue