mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-10-19 11:19:36 +00:00
A request that fails after the TLS handshake reports Error::Read or Error::Write, and SSLSocketStream dropped the TLS error behind it. On TLS 1.3, where a server rejects a client without a certificate only after the handshake, ssl_error() and ssl_backend_error() were 0 instead of showing, for example, OpenSSL's "tlsv13 alert certificate required". SSLSocketStream now keeps the error from its last failed TLS read or write, and SSLClient copies it into the values Result reports. Error itself stays Read or Write. Those values are also reset at the start of each request, so a later successful request no longer reports the TLS error of an earlier one. A client whose TLS context failed to set up keeps reporting that error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGAYpQgXt95LdDQcJYgjB8