Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
surykatka
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Vincent Pelletier
surykatka
Commits
fafd25bd
Commit
fafd25bd
authored
Sep 01, 2021
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
status: report domain not handled in case of http redirection
parent
a0412e9a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
src/surykatka/bot.py
src/surykatka/bot.py
+16
-0
No files found.
src/surykatka/bot.py
View file @
fafd25bd
...
...
@@ -533,9 +533,25 @@ class WebBot:
# Get the list of HTTP servers to check
result_dict
[
"http_query"
]
=
[]
missing_url_list
=
[]
for
ip
,
url_list
in
ip_to_url_dict
.
items
():
query
=
reportHttp
(
self
.
_db
,
ip
=
ip
,
url
=
url_list
)
for
network_change
in
query
.
dicts
().
iterator
():
if
network_change
[
"status_code"
]
in
(
301
,
302
,
303
):
redirect_url
=
getRootUrl
(
network_change
[
"http_header_dict"
][
"Location"
]
)
if
(
redirect_url
not
in
url_dict
)
and
(
redirect_url
not
in
missing_url_list
):
missing_url_list
.
append
(
redirect_url
)
result_dict
[
"missing_data"
].
append
(
{
"text"
:
"(%s ->) %s"
%
(
network_change
[
"url"
],
redirect_url
),
"date"
:
result_dict
[
"bot_status"
][
0
][
"date"
],
}
)
result_dict
[
"http_query"
].
append
(
{
"status_code"
:
network_change
[
"status_code"
],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment