Description
There are servers out there that sometimes reply with HTTP/0.9 responses, even modern-ish stack (we saw such responses from MSFT servers for example).
I'm filing this here and not on the httparse repo because this is a substantial change worth discussing in the open, and because we need to think about how to support it. Firefox for example has some logic to content-sniff the start of an actual HTTP/1.*
response in the first 4KB of received data on the first request made on the connection, and this is obviously not code that should live in httparse.
As a start, I feel like Hyper should check whether the response starts with "HTTP" at the beginning of the data it received, and if not, maybe it should pretend it saw HTTP/1.0 200 OK\r\n\r\n
.
I say HTTP/1.0
and not HTTP/0.9
because it is literally impossible for httparse::Response
to represent 0.9
in its version field.
Activity