It seems like this line is the issue:
|
ensure_eq!(version, 1, "Unsupported HTTP version"); |
It is my understanding there shouldn't be a meaningful difference parsing a HTTP/1.0 with a 1.1 parser since the only differences are some extra headers and possible result codes which wouldn't exist in the 1.0 response.
httparse_res.version will be 0 in the case of a HTTP/1.0 response. Perhaps that code is attempting to match on the major version number, however httparse uses that field for the minor one which is a bit unintuitive.