Releases: yhirose/cpp-httplib
Releases · yhirose/cpp-httplib
v0.43.1
v0.43.0
v0.42.0
What's Changed
- test: WebSocketIntegrationTest.SocketSettings: do not set AF_INET by @jirislaby in #2420
New Contributors
- @jirislaby made their first contribution in #2420
Full Changelog: v0.41.0...v0.42.0
v0.41.0
- Replace
httplib::any/std::map<std::string, httplib::any>basedres.user_datawith a new type-safeUserDataclass that providesset()/get<T>()API by @yhirose (Fix #2416) - Add
parse_urlutility function withUrlComponentsstruct for parsing URLs into scheme, host, port, path, and query components by @yhirose - [cmake] Allow using pre-existing
zstd::libzstdtarget if it already exists, useful for projects that bundle their own zstd by @crueter in #2390 - Add header parser and URL parser fuzzers for OSS-Fuzz coverage improvement by @DavidKorczynski in #2412
v0.40.0
- Optimize multipart content provider to coalesce small writes and reduce TCP packet fragmentation by
@yhirose in #2410 - Add set_socket_opt function and corresponding test for TCP_NODELAY option by @yhirose in
#2411 - Implement request body consumption and reject invalid Content-Length with Transfer-Encoding to prevent
request smuggling by @yhirose - Fixed warnings by @yhirose
v0.39.0
v0.38.0
Security Enhancements
- Filename sanitization for path traversal prevention — Added
sanitize_filename()to prevent path traversal attacks via malicious filenames in multipart uploads (83e98a2) - Symlink protection in static file server — Static file serving now detects and rejects symlinks that point outside the mount directory, preventing symlink-based directory traversal (f787f31)
New Features
- Brotli compression support — Added Brotli (
br) as a supported content encoding alongside gzip and deflate (ec1ffbc) - Accept-Encoding quality parameter parsing — The server now parses
q=quality values in theAccept-Encodingheader and selects the best encoding accordingly (bb7c7ab) - SSL proxy connection support —
SSLClientcan now establish connections through HTTPS proxies, with a newsetup_proxy_connectionmethod for cleaner proxy handling (f6ed5fc, b1bb2b7) - WebSocket ping interval runtime configuration — WebSocket ping interval can now be configured at runtime instead of only at compile time (257b266)
Improvements
- Benchmark test suite — Added benchmark tests and configurations for performance evaluation (ba0d0b8)
- Unicode path component decoding tests — Added test coverage for Unicode characters in
decode_path_component(43a54a3) - Documentation updates — Enhanced TLS backend documentation with platform-specific certificate handling details; clarified progress callback usage and user data handling in examples (511e3ef, 2e61fd3)
Bug Fixes
- Fix port conflict in test — Fixed port number in
OpenStreamMalformedContentLengthtest to avoid conflicts (4978f26)