What's Changed
- Abstract TLS API support (Resolve #2309) by @yhirose in #2342
- Add C++ modules support by @mikomikotaishi in #2291
- Fix #2339 by @yhirose in #2344
- Fix #2116 by @yhirose in #2346
- Fix memory leak by @yhirose in #2348
Breaking Changes
1. Default value change for CPPHTTPLIB_PAYLOAD_MAX_LENGTH
- Old: std::numeric_limits<size_t>::max() (effectively unlimited)
- New: 100 * 1024 * 1024 (100MB)
- Code that receives payloads larger than 100MB will now fail with ExceedMaxPayloadSize error
2. Introduction of the TLS Abstraction Layer (Abstract TLS API)
- Mbed TLS can now be used by defining CPPHTTPLIB_MBEDTLS_SUPPORT
- Request::ssl (SSL* type) has been removed and replaced with Request::ssl (tls::const_session_t type)
- ClientConnection::ssl has similarly been changed to tls::session_t
- Constructors and methods that directly use OpenSSL types (X509*, EVP_PKEY*, etc.) are now deprecated
- SSLServer: X509*/EVP_PKEY* constructors → migrate to SSLServer(PemMemory) or SSLServer(ContextSetupCallback)
- SSLClient: ssl_context() → use tls_context() instead
- Client: set_server_certificate_verifier(std::function<SSLVerifierResponse(SSL*)>) → use set_server_certificate_verifier(tls::VerifyCallback) instead
- Result: ssl_openssl_error() → use ssl_backend_error() instead
- Request: req.ssl (OpenSSL SSL*) → req.ssl (tls::const_session_t) + use req.peer_cert() / req.sni()