mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-24 06:03:43 +00:00
Ensure redirected URL is Unicode encoded.
This commit is contained in:
parent
c8e6995ecd
commit
b8b0398dd2
2 changed files with 3 additions and 1 deletions
|
|
@ -9,6 +9,8 @@ Fixes:
|
|||
Closes: SF bug #2901667
|
||||
- http: Retry if server closed connection and sent an empty
|
||||
status line. Fixes the "BadStatusLine" errors.
|
||||
- http: Prevent UnicodeDecodeError on redirection by ensuring that
|
||||
the redirected URL will be Unicode encoded.
|
||||
- installer: Add commandline executable to Windows installer.
|
||||
Closes: SF bug #2903257
|
||||
- http: Warn about permanent redirections even when redirected URL is
|
||||
|
|
|
|||
|
|
@ -313,8 +313,8 @@ Use URL `%(newurl)s' instead for checking.""") % {
|
|||
newurl = self.headers.getheader("Location",
|
||||
self.headers.getheader("Uri", ""))
|
||||
# make new url absolute and unicode
|
||||
newurl = urlparse.urljoin(redirected, newurl)
|
||||
newurl = unicode_safe(newurl)
|
||||
newurl = urlparse.urljoin(redirected, newurl)
|
||||
log.debug(LOG_CHECK, "Redirected to %r", newurl)
|
||||
self.add_info(_("Redirected to `%(url)s'.") % {'url': newurl})
|
||||
# norm base url - can raise UnicodeError from url.idna_encode()
|
||||
|
|
|
|||
Loading…
Reference in a new issue