Repository navigation
What's Changed
Build requirement
- Mbed TLS: cpp-httplib now requires Mbed TLS built with
MBEDTLS_THREADING_C, and stops with an#errorotherwise.SSLServerhandles connections on several threads, and Mbed TLS is not thread-safe without this option, so concurrent TLS connections could corrupt memory. Mbed TLS's default configuration leaves the option off. Distribution packages such as Debian, Ubuntu and Homebrew turn it on, so builds against them are unaffected. If your build now stops, rebuild Mbed TLS withMBEDTLS_THREADING_C(andMBEDTLS_THREADING_PTHREADorMBEDTLS_THREADING_ALT), or defineCPPHTTPLIB_MBEDTLS_SINGLE_THREADEDif Mbed TLS is only ever used from one thread. Yocto's defaultmbedtlsrecipe is one such build.
Behavior changes
- Client (Digest auth): when a server offers both
qop=authandqop=auth-int, the client now answers withauth, as curl does.auth-inthashes the body, which is empty when a content provider streams it, so those requests failed. - Client (Digest auth): with several Digest challenges, the client uses the first one it can answer (RFC 7616): realm and nonce present, an algorithm it implements, and a usable qop if one is given. If none qualifies, the 401 is returned without a retry. It used to look only at the first challenge, and answered an unsupported algorithm (SHA-512-256, the
-sessvariants) with an MD5 hash under the server's algorithm name.
Bug fixes
- Client (Digest auth): challenge parameter names (
Realm,QOP,Nonce, ...) are matched case-insensitively (#2702), as RFC 9110 requires. - Client (Digest auth):
algorithmandqopvalues are matched case-insensitively, soalgorithm=sha-256is answered with SHA-256 instead of MD5. - Auth: several spaces after the auth scheme are accepted (RFC 9110).
Digest realm=...was not recognized as Digest, andget_bearer_token_auth()returned the token ofBearer abcwith a leading space.
Full Changelog: v0.68.0...v0.69.0