News for hackers. Stuff that matters.
Re:I’ve banned query strings by dylan604 on Sunday May 10, 2026 @12:24AM (#48080994)
Wouldn't a generic 400 be better. It's not that the page wasn't found, but you've sent something that was not an accepted request. Fix your request and try again is how I've read it, and that's how I use it in the APIs I provide. I prefer it over 406 since it's not my end that can't process it. If your query string is tacking extra stuff trying to break things or just because your request wasn't crafted per the docs, then it's on you.
Re:I’ve banned query strings by Ekaros on Sunday May 10, 2026 @06:35AM (#48082683)
406 would be wrong for me. As it is to be used when client sends Accept: header and server cannot fulfil that. HTTP return codes get quite specific when you read the actual description and not just name.