Repository navigation
vendor : update cpp-httplib to 0.64.0 - #31400
Merged
Merged
Conversation
cabelo
marked this pull request as ready for review
October 30, 2026 01:15
edwardyoon
pushed a commit
to edwardyoon/focus-llama
that referenced
this pull request
Oct 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Additional information
Requirements
What's Changed
Behavior changes
Several changes below alter behavior that existing code may rely on:
set_error_handler()therefore runs for it too. On a WebSocket upgrade, an exception from the pre-routing handler, the pre-request handler or the sub-protocol selector now goes through the exception handler and is answered over HTTP, where it used to drop the connection.Rangeis honored only on GET and HEAD. Other methods get the whole response.Transfer-Encodinglists a coding besides a singlechunkedis answered with 501 and the connection is closed. A list whose final coding is notchunkedstill gets 400.CPPHTTPLIB_UNREAD_PAYLOAD_MAX_LENGTH(256KB by default, 0 for no limit) within the read timeout, and closes the connection otherwise..or a space, on every platform. On Windows it also refuses a path containing:.set_file_extension_and_mimetype_mapping()lowercases the extension and drops a leading.when it is set, so".pdf"and"PDF"both match.pdfand.PDFfiles.CPPHTTPLIB_HEADER_MAX_LENGTH. This applies to request bodies on the server and response bodies on the client.res.headersbefore any header writer runs, so a writer set withset_header_writer()no longer sees them.set_trusted_proxies()matches addresses as IP addresses, so an IPv4-mapped IPv6 peer matches the IPv4 address listed.set_follow_location(true), only 301, 302, 303, 307 and 308 are followed./. Otherwise the request fails withError::Writebefore anything is written. This includesOPTIONS *.set_*changes a TLS setting (certificate or host name verification, a CA store, a verifier), a connection kept alive under the old settings is closed instead of reused.set_decompress(false).SSEClient::last_event_id()returnsstd::stringinstead ofconst std::string &. Code that copies the result or binds it to a const reference still compiles.set_hostname_addr_map()is deprecated in favor ofset_direct_hostname_addr_map(), which behaves the same.New features
Server::set_compress()turns off compression of handler responses, buffered or streamed. Compression stays on by default, and static file compression keeps its own setting. Turning it off over HTTPS avoids BREACH-style leaks.set_tunnel_hostname_addr_map()onSSLClient,ClientandWebSocketClientsends a CONNECT tunnel to another address than the origin hostname. The Host header, the SNI and the certificate check inside the tunnel keep the original hostname. It corresponds to curl's--connect-to, andset_direct_hostname_addr_map()to--resolve.WebSocketClient::set_basic_auth()andset_bearer_token_auth().Security-relevant fixes
Content-Lengthor chunkedTransfer-Encodingin builds without TLS too. They used to read what followed up to EOF on a connection about to close.chunked, as described above..or a space, and a:on Windows. Windows resolves such names to another file, so a file could be reached under a spelling that a check in the pre-routing handler did not match.:as a path separator insanitize_filename()on Windows .close_notifyin the Mbed TLS and wolfSSL read . A response delimited by the connection close could be cut short and still come back complete.tls::create_ca_store()through a NUL-terminated copy. It used to read one byte past the buffer.Bug fixes
Connection: close. The next request was written to a connection the server was closing and failed with "Failed to read connection"..and..segments from absolute-path and absolute-URI redirect locations , as RFC 3986 section 5.2.2 requires.set_decompress(false)inopen_stream()andstream::Get().write_websocket_frameand the request body write ofopen_stream_(). A short write dropped the rest of the frame or body.SSEClient: guardlast_event_id()against the async event loop . A read from another thread raced the writes.RequestWithoutContentLengthOrTransferEncodingnow runs on Windows too.