mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-11-27 20:58:28 +00:00
The no-exceptions CI job runs the *_Online tests, and over its last 40 runs 27 failed, each time on tests that never reached what they check: - google.com answered CI runners with 302 or 429 instead of the 301 or 200 the certificate verification tests asserted. Those tests only need a response, which proves the handshake and the verification passed, as UniversalClientRedirectTest.EnableSystemCaCarriesOver_Online already does. Issue2004_Online is a regression test for a crash, so a response is enough there too. - badssl.com drops connections from CI runners before it sends its certificate, so the hostname and self-signed checks never ran. From elsewhere, the same OpenSSL 3.0.13 gets the certificate and the expected verification error. Generalize retry_gateway_errors() to retry_service_failures(), which also treats a handshake that failed before any verdict on the certificate as the service's failure, and use it for the two badssl.com tests. Such a handshake failure in the client itself is caught by the TLS tests that run against local servers.