GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Categories
  • Newsletter
  • Submit
  • Login
  • Awesome C++
  • cpp-httplib

This view

  • Original page
  • New address

GeezerVison is showing cpp.libhunt.com โ€” cpp-httplib/CHANGELOG and cpp-httplib Releases | LibHunt

  • Subscribe
  • Submit
  • Categories
  • About
  • Login

cpp-httplib changelog

A C++ header-only HTTP/HTTPS server and client library

Take the C++ Developer Survey - About 6 minutes on the tools, libraries and AI you use with C++. You get the results by email. Take the survey ยป
All Versions
34
Latest Version
0.50.1
Avg Release Cycle
6 days
Latest Release
139 days ago

Changelog History
Page 1

  • v0.50.1 Changes

    July 12, 2026

    What's Changed

    ๐Ÿ”’ Security fixes

    • Fix use-after-free of TLS session in WebSocketClient::shutdown_and_close() (GHSA-w7p7-f35j-mw7q). shutdown_and_close() freed the TLS session before ws_->close() sent the WebSocket close frame. The WebSocket's SSLSocketStream keeps a raw pointer to that session, so sending the close frame read/wrote a freed SSL object. This affects any wss:// client that is destroyed (or reconnected via connect()) while the connection is still open, without an explicit close() first. The close frame is now sent while the session is still alive, and the session is freed afterward. Regression tests covering both the destroy-while-open and reconnect-while-open paths were added

    Full Changelog : v0.50.0...v0.50.1

  • v0.50.0 Changes

    July 11, 2026

    What's Changed

    ๐Ÿ”’ Security fixes

    • Fix CRLF injection in chunked response trailers. Trailer field names and values written via DataSink::done_with_trailer() were never validated, unlike every other header output path (set_header, WebSocket handshake, client request headers). An application reflecting untrusted input into a trailer could inject CR/LF sequences and achieve HTTP response splitting. Trailer fields with invalid names or values are now silently skipped, matching set_header()'s existing behavior

    ๐Ÿ’ฅ Breaking changes

    • โž• Add Get(path, params, progress) overload to ClientImpl/Client (#2486). This makes calls that pass a headers argument as a braced initializer list โ€” e.g. cli.Get(path, {{"Accept", "..."}}) โ€” ambiguous between the existing Get(path, headers) overload and the new Get(path, params) overload, since {{...}} can construct either Headers or Params. Existing code relying on that implicit conversion will fail to compile with an "ambiguous call" error; disambiguate by wrapping the argument explicitly, e.g. cli.Get(path, Headers{{"Accept", "..."}}). All in-tree call sites (test.cc, test_proxy.cc, README) were updated to do this

    ๐Ÿ› Bug fixes

    • Fix use-after-free in SSLClient destructor with mbedTLS (Fix #2492). SSLClient::~SSLClient() freed the TLS context before shutting down the SSL session. mbedTLS sessions hold a raw pointer into the context's mbedtls_ssl_config, so a live keep-alive session's close_notify could read freed memory. The session is now shut down before the context is freed
    • Fix Response::content_length_ not reflecting body size in Logger (Fix #2488). Server::apply_ranges computed the correct Content-Length header for body-based responses but never updated content_length_, so the Logger callback always saw 0. It now reflects the final body size (post-range/post-compression)

    ๐Ÿ“„ Docs

    • ๐Ÿ›  Fix README WebSocket example to match actual API (Fix #2493). The quick preview referenced a nonexistent httplib::ws::Message type with .is_text()/.data; the actual API uses a plain std::string with ws.read(msg), as already shown in README-websocket.md
    • ๐Ÿ›  Fix broken relative links in cookbook docs (Fix #2490). Cookbook body links referenced sibling pages with a bare slug (e.g. c14-keep-alive), which 404 under the pretty-URL layout since each page lives in its own directory. Links are now prefixed with ../ to match convention

    Full Changelog : v0.49.0...v0.50.0

  • v0.49.0 Changes

    July 02, 2026

    What's Changed

    ๐Ÿ”’ Security fixes

    • ๐Ÿ’ป Escape ", CR, and LF in multipart field names and filenames when serializing multipart/form-data bodies. Previously these values were concatenated into the Content-Disposition quoted-string unescaped, so a " silently terminated the quoted-string early, and embedded CR/LF allowed injecting arbitrary part headers or forging part boundaries when a filename comes from external input. Escaping follows the WHATWG HTML standard (" โ†’ %22, CR โ†’ %0D, LF โ†’ %0A), matching what browsers send; behavior only changes for inputs that previously produced malformed HTTP
    • Close the same header-injection vector for part content types: CR/LF in MultipartFormData::content_type are now escaped (%0D/%0A) before being written into the part's Content-Type header. " is left intact since it is legal in Content-Type values (e.g. quoted charset parameters)

    ๐Ÿ†• New features

    • Add public MultipartFormDataWriter for multipart body serialization outside Client::Post/Put/Patch (e.g. to feed a custom content provider or compose with other body sources), which previously required calling unstable detail:: functions directly. Supports whole-body serialization with known content length and per-part framing (item_begin/item_end/finish) for streaming. Also exposes is_valid_multipart_boundary() so callers using an explicit boundary can validate it without exceptions
    • Make the ThreadPool idle timeout for dynamic threads configurable at runtime via a new fourth constructor parameter: ThreadPool(base_threads, max_threads, max_queued_requests, idle_timeout_sec) (Fix #2481)

    ๐Ÿ› Bug fixes

    • Classify ASCII bytes without consulting the global C locale. std::isalnum/std::isdigit read the locale, so a byte like 0xC5 could classify as alphanumeric once an embedder called setlocale() (observed on macOS). New detail::is_ascii_digit/is_ascii_alpha/is_ascii_alnum helpers are now used at every classification site โ€” multipart boundary validation, token checks, URI encoding, range header parsing, and IPv4 host detection โ€” and the <cctype> include is dropped (Fix #2482, Fix #2483)
    • 0๏ธโƒฃ Omit the default port from the WebSocket handshake Host header, per RFC 6455 Section 4.1 (include the port only when it is not 80 for ws / 443 for wss). Some CDNs alter routing when the Host header carries an explicit default port. IPv6 literal hosts are now bracketed correctly as well (Fix #2480)
    • Send the query string verbatim when path encoding is disabled. set_path_encode(false) only suppressed encoding of the path; the query was still decoded and re-encoded, which is lossy for pre-encoded payloads (%2C โ†’ ,, %20 โ†’ +, etc.) and could corrupt binary query data on strict RFC 3986 servers (#2479)
    • ๐Ÿ‘‰ Use an unsigned accumulator in base64_encode to avoid implementation-defined behavior with high-bit input bytes (#2477)

    ๐Ÿ— Build

    • ๐Ÿ— meson: fix build failure on glibc >= 2.34, where getaddrinfo_a is built into libc and no standalone libanl exists (also fixes architectures like loongarch64/riscv64 that never shipped one) (#2484)

    Full Changelog : v0.48.0...v0.49.0

  • v0.48.0 Changes

    June 19, 2026

    What's Changed

    ๐Ÿ”’ Security fixes

    • Complete the IP-host certificate identity fix from v0.47.0 for the Mbed TLS and wolfSSL backends. An IP-literal host is now authenticated only via a matching iPAddress SAN, never via the certificate's Common Name (RFC 9110) โ€” matching what the OpenSSL backend already enforces through X509_check_ip. Previously these backends fell back to the CN when no IP SAN matched, and recognized IPv4 only; now IPv6 (16-byte) iPAddress SANs are matched as well, and the CN fallback is skipped for both IPv4 and IPv6 literal hosts (#2476)

    ๐Ÿ‘Œ Improvements

    • ๐Ÿ“œ Replace the strtod-based from_chars for double with a hand-written, locale-independent parser. The only double parsed by the library is the HTTP quality value; strtod reads the decimal separator from the global C locale, so an embedder calling setlocale(LC_ALL, "") into a comma-decimal locale would mis-parse q-values. The new parser always treats . as the decimal separator and is allocation-free (Fix #2475)
    • Fix OpenSSL 4.0 deprecation warnings: fetch CA store objects via the thread-safe X509_STORE_get1_objects() (OpenSSL 3.3+) and extract the subject CN via X509_NAME_get_index_by_NID()/X509_NAME_get_entry() instead of the deprecated X509_STORE_get0_objects() and X509_NAME_get_text_by_NID(). Older OpenSSL, BoringSSL, and LibreSSL keep using the get0 path. Verified warning-free against OpenSSL 4.0.1, 3.6.2, and 3.0

    Behavior changes

    • decode_query_component() now uses strict hex parsing for percent-escapes, consistent with decode_uri_component() and decode_path_component(). A % followed by non-hex characters (e.g. a sign or whitespace such as %-1, %+5, % 5) is passed through literally instead of being accepted as a valid escape (#2472)

    Internal

    • ๐Ÿ“œ OSS-Fuzz: add new fuzzer targets for multipart parsing (#2473)

    Full Changelog : v0.47.0...v0.48.0

  • v0.47.0 Changes

    June 10, 2026

    What's Changed

    ๐Ÿ”’ Security fixes

    • ๐Ÿ›  Fix TLS certificate chain verification bypass for IP-literal hosts on the Mbed TLS and wolfSSL backends: with server certificate verification enabled, SSLClient skipped chain validation entirely (any untrusted certificate with a matching IP SAN was accepted), and WebSocketClient on Mbed TLS skipped verification altogether. Chain verification now stays enabled for IP hosts, and certificate identity is verified post-handshake against IP SANs on all backends. SNI is no longer sent for IP hosts on Mbed TLS and wolfSSL, per RFC 6066

    ๐Ÿ†• New features

    • Add Server::set_start_handler(): a callback invoked when the server is ready to accept connections, useful when running the server in a background thread (#2467)
    • Add Client/SSLClient/WebSocketClient::enable_system_ca(bool) to opt into loading system CA certificates alongside a custom CA. The default is unchanged: a custom CA remains exclusive. The setting carries over to clients created for HTTPS redirects (#2471)
    • Add WebSocketClient::set_hostname_addr_map() to connect to a specific IP address while keeping the original hostname for the handshake and certificate verification (#2463)

    Behavior changes

    • ๐Ÿ‘€ The request body is now read after route matching and the pre-request handler, so both the regular handler and ContentReader paths behave the same: route matching โ†’ pre-request handler โ†’ body read โ†’ handler. A request rejected by the pre-request handler (e.g. failed per-route authentication via req.matched_route) no longer buffers the body at all. Note: code that referenced req.body or body-derived form fields inside the pre-request handler will now see an empty body; inspect headers, path, query parameters, or matched_route instead
    • WebSocketClient with a custom CA no longer merges system CA certificates (it previously always merged them). This matches SSLClient behavior; call enable_system_ca(true) to load system CA certificates alongside the custom CA
    • Range request headers are now ignored for streaming responses of unknown length instead of producing an invalid response (#2465)

    ๐Ÿ› Bug fixes

    • Fix SSLClient::set_ca_cert_store() breaking custom-CA exclusivity: system CA certificates were silently merged into the user-provided store, broadening the trust set. Also fix Client::load_ca_cert_store() not carrying CA certificates over to clients created for HTTPS redirects
    • ๐Ÿ›  Fix WebSocketClient dropping the query string from the URL during the upgrade handshake, so query parameters (e.g. auth tokens) are sent (#2468)
    • Fix a use-after-free when reconnecting a WebSocketClient after set_ca_cert_store(), and a memory leak in the Mbed TLS and wolfSSL set_ca_cert_store() backends
    • ๐Ÿ›  Fix MSVC warning C4309 (truncation of constant value) in SHA padding code (#2464)
    • Cast to unsigned char before ctype calls in is_hex and is_token_char to avoid undefined behavior with negative char values (#2469)

    Full Changelog : v0.46.1...v0.47.0

  • v0.46.1 Changes

    June 01, 2026

    What's Changed

    ๐Ÿ› Bug fixes

    • ๐Ÿ›  Fix Expect: 100-continue over TLS: the client decided whether to withhold the request body based on raw socket readability, but post-handshake TLS 1.3 records (e.g. session tickets) make the socket readable without any HTTP response, causing the body to be withheld and the request to fail with Failed to read connection. The client now decides by attempting to read the status line within the 100-continue timeout, and sends the body if none arrives (matching curl) (#2458, #2460)
    • ๐Ÿ›  Fix -Wmissing-field-initializers warnings on Windows by using {} instead of {0} for OVERLAPPED and ADDRINFOEXW initialization (#2459)
  • v0.46.0 Changes

    May 25, 2026

    What's Changed

    ๐Ÿ”’ Security

    • ๐Ÿ›  Fix proxy digest credential leak when an HTTPS origin returns 407 inside a CONNECT tunnel. The 401/407 retry is now gated on the response actually coming from a proxy hop (#2457)

    ๐Ÿ†• New features

    • Add Client::set_no_proxy() for per-host proxy bypass. Accepts *, hostname suffix (dot-boundary rule), IPv4/IPv6 CIDR, and bare IP literals. Proxy-Authorization is suppressed for bypassed hosts, including across redirects (#2446, #2448)
  • v0.45.1 Changes

    May 25, 2026

    What's Changed

    ๐Ÿ› Bug fixes

    • Fix iOS build break caused by TARGET_OS_MAC being true on all Apple platforms (iOS, tvOS, watchOS). The Keychain enumeration path and Security.h include guards are now narrowed to TARGET_OS_OSX, and defining CPPHTTPLIB_USE_CERTS_FROM_MACOSX_KEYCHAIN on a non-macOS Apple platform now emits an explicit #error directing users to set_ca_cert_path() with a bundled CA file. Addresses #2454 (#2455)
    • ๐Ÿ›  Fix zstd detection in the installed httplibConfig.cmake so downstream projects that depend on the installed package correctly pick up zstd (#2453)

    ๐Ÿ‘Œ Improvements

    • ๐ŸŽ Replace the deprecated SecTrustCopyAnchorCertificates (deprecated in macOS 13) with SecTrustSettingsCopyCertificates, iterating over the System, Admin, and User trust domains to retain equivalent anchor-certificate coverage (#2455)
    • Declare Server::stop() as noexcept, reflecting that the implementation does not throw (#2451)

    CI / Internal

    • โž• Add a best-effort BoringSSL CI job (Ubuntu and macOS) that builds BoringSSL from source and exercises cpp-httplib's existing OpenSSL backend path. SSLClientServerTest.TlsVerifyHostname is now backend-aware (BoringSSL is SAN-only per RFC 6125 ยง6.4.4), and the README notes BoringSSL as a best-effort variant with the C++14 and SAN-only caveats (#2456)
    • Add an iOS header parse check to CI to catch accidental use of macOS-only APIs or guards (e.g. TARGET_OS_MAC vs TARGET_OS_OSX) that would silently break iOS builds (#2455)
  • v0.45.0 Changes

    May 15, 2026

    What's Changed

    ๐Ÿ› Bug fixes

    • Fix crash on empty / comma-only X-Forwarded-For when set_trusted_proxies() is configured. get_client_ip() previously called front() on a vector that was empty whenever the header tokenized to zero segments ("", ",", ", , ,"); it now returns an empty string so process_request() falls back to the connection-level remote address instead of crashing (5c92857)
    • Fix keep-alive corruption on requests without a framed body (#2450). The post-response drain ran for any request that expect_content() accepted, so a method like DELETE /items/1 with no Content-Length and no Transfer-Encoding would, on a persistent connection, let read_content consume bytes belonging to the next pipelined request โ€” making the second request appear to vanish. The drain now only runs when the request actually has a framed body (Content-Length or chunked). The non-SSL "stray-bytes โ†’ 413" payload-limit check is likewise limited to non-persistent connections, since on keep-alive any pending bytes may be the next request rather than an unframed body (91271c0)

    Internal

    • Extract detail::has_framed_body() and detail::is_connection_persistent() helpers used by the keep-alive fix above (d755c43)
  • v0.44.0 Changes

    May 10, 2026

    What's Changed

    ๐Ÿ’ฅ Breaking change (behavioral)

    • Stop percent-decoding HTTP request header values. parse_header() previously applied decode_path_component() to every header value (except Location / Referer) after is_field_value() validation, so wire sequences like %0D%0A passed validation and expanded into literal CR/LF inside stored values โ€” enabling response splitting, log injection, and proxy smuggling. %3D / %2C / %3B likewise flipped Cookie and X-Forwarded-For boundaries against WAFs inspecting the wire form. RFC 9110 ยง5.5 specifies header values as opaque octets, so the auto-decode (and the Location / Referer workarounds for the same misbehavior) has been removed. Applications that need URI semantics on a header value should now call decode_uri_component() or decode_path_component() on the result explicitly. Fixes the long-standing Referer-with-%0A issue (#2033) (fbb031e)

    ๐Ÿ› Bug fixes

    • Make ThreadPool constructor exception-safe on partial thread creation. If std::thread construction throws partway through (e.g. pthread_create returns EAGAIN under thread-resource pressure), the partially-built threads_ vector would destruct joinable std::thread objects and call std::terminate(). The spawn loop now signals shutdown to the workers already created, joins them, and rethrows. Fix #2444 (#2445)

    Tooling

    • ๐Ÿš€ scripts/release.sh gains a --minor flag to force a minor bump even when abidiff reports no ABI break, for behavioral breaking changes like the header-decoding fix above (e8e6528)
  • 1
  • 2
  • 3
  • 4
  • Next โ€บ
  • Last ยป
Awesome C++ is part of the LibHunt network. Terms. Privacy Policy.

(CC)
BY-SA
Spin The Wheel Of Names for a cryptographically secure random name picker.
Schedule a when to meet poll.
You are visitor 01402775 โ€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800ร—600. No cookies required.