mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-08-20 00:55:02 +00:00
RFC 9110 Section 10.1.1 defines Expect as a comma-separated list, states that its value is case-insensitive, and requires a server that receives a 100-continue expectation in an HTTP/1.0 request to ignore it. Comparing the whole field value against "100-continue" met none of those. An HTTP/1.0 request asking for 100-continue was answered with a 100 (Continue) interim response, which that section forbids. "100-Continue" and "100-continue, foo" were both read as no expectation at all, so a client that waits for the interim response before sending its content waited for a response that was never coming. Route the check through has_header_token(), which walks every field line and compares complete tokens case-insensitively, and skip it for HTTP/1.0. An expectation cpp-httplib does not recognize is still ignored rather than refused; the 417 the section offers for one is a MAY, not a requirement.