thetillhoff / webscan

Verifies web things
MIT License
1 stars 1 forks source link

Empty body shouldn't not show html5 warning #57

Closed thetillhoff closed 2 months ago

thetillhoff commented 3 months ago

If a site just returns 401 or similar status codes, then of course it isn't valid html5. That Warning should only be shown if the content length is >0 and/or if it's html at all. Alternatively, it could be checked what's the expected content type; for example verify it's valid json for application/json...

## HTTPS content scan results

Compression is not enabled
invalid html5: First non-comment node must be the doctype node, found html

HTML size: 0kB
Total download size (without media): 0kB
thetillhoff commented 2 months ago

Fixed with next release, while the second part was added to upcoming feature list in README