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