Commit 57e4ab2f authored by Romain Courteaud's avatar Romain Courteaud

Warn about not checked URL

parent 49a3a992
...@@ -694,16 +694,15 @@ class WebBot: ...@@ -694,16 +694,15 @@ class WebBot:
# Confirm that redirection url are checked # Confirm that redirection url are checked
if network_change["status_code"] in (301, 302, 303): if network_change["status_code"] in (301, 302, 303):
# XXX check full url # XXX check full url
redirect_url = getRootUrl( redirect_url = network_change["http_header_dict"]["Location"]
network_change["http_header_dict"]["Location"]
)
if (redirect_url not in url_dict) and ( if (redirect_url not in url_dict) and (
redirect_url not in missing_url_list redirect_url not in missing_url_list
): ):
missing_url_list.append(redirect_url) missing_url_list.append(redirect_url)
result_dict["missing_data"].append( result_dict["warning"].append(
{ {
"text": "(%s ->) %s" "text": "(Not checked URL %s ->) %s"
% (network_change["url"], redirect_url), % (network_change["url"], redirect_url),
"date": rfc822(network_change["status"]), "date": rfc822(network_change["status"]),
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment