News for hackers. Stuff that matters.
Re:I’ve banned query strings by onion2k on Sunday May 10, 2026 @02:45AM (#48081576)
You can return whatever HTTP response code you want, but if you care about knowing whether your site is working being about to look at the logs and see "That user requested a page that doesn't exist" being different to "That user requested a page that exists but had no results" is quite useful. In coding terms it's the difference between a null and an empty array.
Re:I’ve banned query strings by ruszki on Sunday May 10, 2026 @09:12AM (#48083716)
You can do that with filtering, which should be a feature of every single logging tools.

Anyway, I agree that when you filter via queries, an empty list is more valid response than 404. That HTTP status should be returned IMHO when the requested (for example by id) item is not found (and of course with wrong paths, etc).