Hacker News new | ask | show | jobs
by jimbokun 1206 days ago
I’m confused, if the RFC does not accurately model HTTP requests, what does?
1 comments

Your customers define what an HTTP request is.

To be less snarky, the RFC defines what a well-formed HTTP request is. In the wild there are a lot of malformed HTTP requests that business cases may require handling.

I suppose the “parse don’t validate” philosophy would recommend first transforming the I’ll formed request into a data structure that only models well formed requests, before it’s processed by any other part of the program.