Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Make HTTP/0.9 opt-in #2873
I did this
Use curl to get data from a server that isn't responding with a proper HTTP/1 or HTTP/2 response.
curl will gladly hand over the received data as HTTP body. This is because it supports "HTTP/0.9", which is how HTTP used to work before 1.0 (1996): that's just body bytes that ends with a closed connection.
I expected the following
It should report an error if the response is not HTTP protocol compliant. I suspect this "liberal in what you accept" and treating everything as HTTP/0.9 might be surprising to users and I'm also afraid it could cause some unexpected behaviors.
HTTP/0.9 support should therefor be done opt-in. mentioned on the mailing list in July 2018 - no objections there.
curl 7.61.1 still has it supported by default.
HTTP/0.9 detection was improved in #2872 after which fixing this issue should be pretty easy.