Commit 4c93910e authored by Romain Courteaud's avatar Romain Courteaud

Only warn about no content-type if there is a response body

parent bb3d5e5c
......@@ -719,12 +719,20 @@ class WebBot:
if (
"Content-Type"
not in network_change["http_header_dict"]
):
if (
network_change["http_header_dict"].get(
"Content-Length", 0
)
!= 0
):
result_dict["warning"].append(
{
"text": "(No Content-Type header) %s"
% (network_change["url"],),
"date": result_dict["bot_status"][0]["date"],
"date": result_dict["bot_status"][0][
"date"
],
}
)
elif network_change["http_header_dict"][
......
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