flathub-infra / linux-store-frontend

A web application to browse and install applications present in Flatpak repositories. Powers https://www.flathub.org
Apache License 2.0
187 stars 50 forks source link

flathub returns 200 Status OK for broken URLs instead of 404. #327

Open skierpage opened 2 years ago

skierpage commented 2 years ago
  1. Visit https://flathub.org//garbage/here
  2. Enter curl --head https://flathub.org/garbage/here

Result: you get a jokey

It would be regular 404 page … except, we didn’t receive a 404 response status!

error page, but the web server returns HTTP/2 200 status OK.

This leads to scripts and crawlers thinking failed requests succeeded, unless they use heuristics to look at the page content.

nginx JavaScript may be inserting the faux 404 text.