mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-23 17:30:24 +00:00
Improved redirection warning text.
This commit is contained in:
parent
d9e981e497
commit
b2cf40151f
1 changed files with 6 additions and 6 deletions
|
|
@ -388,16 +388,16 @@ class HttpUrl (internpaturl.InternPatternUrl, proxysupport.ProxySupport):
|
|||
return -1, response
|
||||
# in case of changed scheme make new URL object
|
||||
if self.urlparts[0] != self.scheme:
|
||||
if set_result:
|
||||
self.add_warning(
|
||||
_("Redirection to different URL type encountered; "
|
||||
"the original URL was `%(url)s'.") %
|
||||
{"url": self.url},
|
||||
tag=WARN_HTTP_WRONG_REDIRECT)
|
||||
newobj = get_url_from(
|
||||
redirected, self.recursion_level, self.aggregate,
|
||||
parent_url=self.parent_url, base_ref=self.base_ref,
|
||||
line=self.line, column=self.column, name=self.name)
|
||||
if set_result:
|
||||
self.add_warning(
|
||||
_("Redirection to URL `%(newurl)s' with different scheme"
|
||||
" found; the original URL was `%(url)s'.") %
|
||||
{"url": self.url, "newurl": newobj.url},
|
||||
tag=WARN_HTTP_WRONG_REDIRECT)
|
||||
# append new object to queue
|
||||
self.aggregate.urlqueue.put(newobj)
|
||||
# pretend to be finished and logged
|
||||
|
|
|
|||
Loading…
Reference in a new issue