Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1246 commits
Select commit Hold shift + click to select a range
e640f83
Release v0.55.0
yhirose Sep 11, 2026
6b8c3f5
Report only a caller-set WebSocket read timeout as Timeout
yhirose Sep 11, 2026
278c297
Release v0.56.0
yhirose Sep 11, 2026
f15992c
Update documentation
yhirose Sep 14, 2026
f37a5b1
Fix #2583
yhirose Sep 14, 2026
deb520e
Update version files with sed -i.bak, which GNU sed accepts too
yhirose Sep 19, 2026
4cb363e
Run pre_request_handler for WebSocket routes
yhirose Sep 19, 2026
2e5480a
Document that pre_request_handler runs for WebSocket routes
yhirose Sep 19, 2026
09c02f1
Send 100 Continue only when the request body is read
yhirose Sep 19, 2026
52f214b
Don't wait for the peer's close_notify on OpenSSL shutdown
yhirose Sep 19, 2026
8b87260
reject control characters in chunk extensions in read_payload (#2585)
metsw24-max Sep 21, 2026
82722fc
Release v0.57.0
yhirose Sep 21, 2026
ad88645
Reject non-token methods in write_request_line
yhirose Sep 21, 2026
91c55a4
Release v0.57.1
yhirose Sep 21, 2026
9386b25
Don't wait for a response to a request rejected before sending
yhirose Sep 21, 2026
6d59d1e
Build open_stream's request head in memory before sending
yhirose Sep 21, 2026
4f3f9ef
Release v0.58.0
yhirose Sep 22, 2026
5a202d3
Added a feature test to auto enable/disable CPPHTTPLIB_USE_NON_BLOCKI…
TobiasWallner Sep 25, 2026
8b6ab24
Resolve relative Location references on redirect (#2586)
VecSzn Sep 26, 2026
2fb2dbb
Send small static files with the headers and large bodies without a c…
yhirose Sep 27, 2026
57c4f7f
Reject trailing characters in HTTP quality values (#2590)
DosX-dev Sep 27, 2026
174bce5
Escape request data in the docker server's access and error logs
yhirose Sep 28, 2026
e11dbec
Reject control characters in the request-target
yhirose Sep 28, 2026
c1c2b1f
Apply the request-target check to the client and encode control chars
yhirose Sep 28, 2026
3330d0e
Ignore an SSE retry field that is not all digits (#2591)
youdie006 Sep 28, 2026
0715c27
Enforce a minimum SSE reconnect wait to avoid a busy loop (#2592)
yhirose Sep 28, 2026
639391a
Reject an invalid Content-Length and honor Connection: close
yhirose Oct 2, 2026
0db1df7
Pass the server's intermediates to Windows certificate verification (…
yhirose Oct 3, 2026
43863e1
Make CryptoAPI the only chain verifier when Windows verification is o…
yhirose Oct 3, 2026
10aadd5
Reject trailing characters in URL port numbers (#2593)
youdie006 Oct 3, 2026
8a3abfb
Extract parse_int_in_range from parse_port
yhirose Oct 3, 2026
7255a7e
Preserve empty SSE data fields (#2594)
DosX-dev Oct 3, 2026
dd71728
escape quoted-string auth-params in make_digest_authentication_header…
metsw24-max Oct 3, 2026
3d40dfc
Fix SSE parsing of CRLF field names and data-less events
yhirose Oct 3, 2026
4fd9ae8
Serve pipelined requests without waiting for the keep-alive timeout
yhirose Oct 3, 2026
cf3693c
Release v0.59.0
yhirose Oct 3, 2026
eda9a10
Fix SSE client not clearing Last-Event-ID on an empty id field (Fix #…
yhirose Oct 3, 2026
438319c
Fix WebSocket pings being sent early on spurious wakeups
yhirose Oct 3, 2026
09fa682
Fix 303 redirect request bodies and Location path decoding (Fix #2606…
yhirose Oct 3, 2026
d59f3e4
Remove semantically redundant closed_ checks in ping thread. (#2613)
jordan-woyak Oct 4, 2026
4fcbc08
reject an unoffered subprotocol in read_websocket_upgrade_response (#…
metsw24-max Oct 4, 2026
6d10494
Ignore a subprotocol the WebSocket client did not offer
yhirose Oct 4, 2026
edc9760
use the SAN type tag in Mbed TLS verify_hostname and get_cert_sans (#…
metsw24-max Oct 6, 2026
17eeb18
Release v0.60.0
yhirose Oct 7, 2026
2130296
Serve the whole body for a suffix range longer than it (#2615)
youdie006 Oct 8, 2026
57b8aca
Avoid name clash with class WebSocketClient by explicit qualification…
hxmf Oct 8, 2026
e803f5e
Let the SSL chain policy alone judge the Windows chain (#2618)
yhirose Oct 8, 2026
00afaae
Release v0.60.1
yhirose Oct 8, 2026
8f094fe
match a wildcard only in the leftmost label in match_hostname (#2619)
metsw24-max Oct 8, 2026
84ff13e
Treat a payload max length of 0 as unlimited on every read path
yhirose Oct 8, 2026
8aa547e
Wake a blocked WebSocket read when the pong timeout fires
yhirose Oct 8, 2026
f6aee69
Log the response length for static files in the docker server
yhirose Oct 8, 2026
05f7478
Fix README samples and statements that no longer match the code
yhirose Oct 8, 2026
bef278e
Fix docs pages that no longer match the code
yhirose Oct 8, 2026
c95d799
Polish the wording of the updated docs pages
yhirose Oct 8, 2026
885ed54
Unify spacing and wording in the Japanese docs pages
yhirose Oct 8, 2026
fee592c
Ignore a leading UTF-8 BOM in an SSE stream
yhirose Oct 9, 2026
5189edc
Ignore an SSE id that cannot be sent as Last-Event-ID
yhirose Oct 12, 2026
1f12bba
Treat a bare CR as an SSE line ending
yhirose Oct 12, 2026
0acbee1
Reject an ambiguous or invalid Host in a request
yhirose Oct 12, 2026
5107381
Fix the RFC reference in the Host validation test
yhirose Oct 12, 2026
33d84a1
Compare the Range unit case-insensitively
yhirose Oct 12, 2026
cbaf751
Ignore quoted-strings when parsing an Accept header
yhirose Oct 13, 2026
11daa99
Stop at the last match when getting a value by index
yhirose Oct 13, 2026
941745c
Send proxy Basic authentication when one credential is empty
yhirose Oct 13, 2026
878ba41
Wait for the reconnect in the SSE retry test instead of sleeping
yhirose Oct 13, 2026
c419c90
Release v0.61.0
yhirose Oct 14, 2026
924b5ce
Fix redirect for mounted folders (#2628)
mervindejong Oct 14, 2026
2c918f2
Redirect a directory request with a relative Location (#2630)
yhirose Oct 14, 2026
c03af24
Use a strong entropy source for the WebSocket masking key (#2629)
metsw24-max Oct 14, 2026
4a1700c
Use fill_random_bytes in random_string
yhirose Oct 14, 2026
16f9d4a
Avoid getaddrinfo_a under ThreadSanitizer (#2631)
cosminpolifronie Oct 15, 2026
e374966
Keep a single content source in a Response
yhirose Oct 16, 2026
6fc6774
Keep TLS verify callbacks per context
yhirose Oct 16, 2026
c11d95b
Pass the session handle to wolfSSL verify callbacks
yhirose Oct 16, 2026
fc0e823
Close the connection after a partly read request body
yhirose Oct 16, 2026
b917676
Declare set_file_content_provider for the split build
yhirose Oct 16, 2026
2e278fd
Parse status lines without std::regex
yhirose Oct 16, 2026
344311c
Grow a WebSocket payload only as it arrives
yhirose Oct 16, 2026
2b66aa6
Keep a client's limits and TLS checks across redirects
yhirose Oct 16, 2026
d78a3cb
Carry the CA store and session verifier over to the redirect client (…
metsw24-max Oct 16, 2026
41fada8
Bound a TLS handshake by its timeout as a whole
yhirose Oct 16, 2026
9c51a0e
Wait for handshakes before replacing a server's certificates
yhirose Oct 16, 2026
e225d18
Store the TLS verify callback per context instead of thread_local
claude Oct 16, 2026
9f6dcf1
Carry the server certificate verifier over to the redirect client (#2…
yhirose Oct 16, 2026
0c583ac
Drop no-op mbedtls_ssl_conf_verify reset in set_verify_callback
claude Oct 16, 2026
5056242
Simplify per-context verify callback bookkeeping
claude Oct 16, 2026
65dbca0
Merge origin/master into claude/sweet-keller-2fba4t
claude Oct 16, 2026
5d10095
Install one verify callback on every Mbed TLS session
claude Oct 16, 2026
6acdc62
Compare names as strings instead of by hash
yhirose Oct 16, 2026
f642097
Drop the redundant has_verify_callback flag from the wolfSSL context
claude Oct 16, 2026
a445ed2
Tidy the Mbed TLS verify callback after the per-session change
claude Oct 16, 2026
82e28aa
Hash case-insensitive keys in a loop
yhirose Oct 16, 2026
d41d558
Remove the unused ClientImpl::copy_settings
yhirose Oct 16, 2026
194f392
Treat a zero payload limit as none when decompressing a stream
yhirose Oct 16, 2026
0116be0
Treat a zero WebSocket payload limit as none
yhirose Oct 16, 2026
b270564
Keep a Client usable when its URL cannot be used
yhirose Oct 16, 2026
6722556
Do not reserve a response body by its claimed length
yhirose Oct 16, 2026
f5e1102
Bound each WebSocket fragment by what is left of the limit
yhirose Oct 16, 2026
cadcc42
Bound the size of an SSE event
yhirose Oct 16, 2026
d5851d7
Resume the multipart header search where it stopped
yhirose Oct 16, 2026
64bebd3
Honor quoted-pairs in parameter values
yhirose Oct 16, 2026
58957ae
Close the connection after an ambiguous Transfer-Encoding
yhirose Oct 16, 2026
3420ba8
Read the request line strictly
yhirose Oct 16, 2026
4551663
Keep a %u escape that is not a character
yhirose Oct 16, 2026
eeaae4b
Serve no file whose path cannot be resolved
yhirose Oct 16, 2026
aaccde2
Reject userinfo and backslashes in a URL authority
yhirose Oct 16, 2026
5d10305
Close the connection after an early answer to Expect: 100-continue
yhirose Oct 16, 2026
ce7ecb6
Skip every interim response, with its header fields
yhirose Oct 16, 2026
162b87f
Fail a refused CONNECT instead of returning the proxy's answer
yhirose Oct 16, 2026
7ce6c64
Validate a WebSocket Close before echoing it
yhirose Oct 16, 2026
0fe883d
Document when an SSL client loads its CA certificates
yhirose Oct 16, 2026
07c3e8c
Set the client verify mode under the context lock
yhirose Oct 16, 2026
314e557
Match certificate names as X509_check_host does
yhirose Oct 16, 2026
fcf7568
Complete server certificate updates on every backend
yhirose Oct 16, 2026
7c44a7a
Compare extensions, header names and media types without case
yhirose Oct 16, 2026
f361a08
Add certificate and session verifiers to WebSocketClient
yhirose Oct 16, 2026
3782a9f
Document what follows a cross-host redirect
yhirose Oct 16, 2026
44658e6
Read served files with pread
yhirose Oct 16, 2026
66266b8
Document regex route, file handler and WebSocket Origin caveats
yhirose Oct 16, 2026
ceedf6a
Fuzz the buffered path of the line reader
yhirose Oct 16, 2026
ae169c6
Address review of the audit fixes
yhirose Oct 16, 2026
300c084
Derive the TLS verify mode from one place per backend
claude Oct 16, 2026
aa3aeb8
Name the Mbed TLS verify-mode helper like the other backends
claude Oct 16, 2026
589b028
Build the client-cert-still-required tests on the existing helpers
claude Oct 16, 2026
8f21292
Tidy the client certificate test helpers
claude Oct 16, 2026
bc837b8
Bound the request head by the read timeout as a whole
yhirose Oct 16, 2026
43c9c6d
Frame response bodies in one place
yhirose Oct 16, 2026
6529de1
Declare tls::set_verify_callback() for the split test build
claude Oct 16, 2026
9a3c1fe
Stop copying CA certificates on Mbed TLS
yhirose Oct 16, 2026
b4ef313
Accept a write error for a client rejected after the TLS 1.3 handshake
claude Oct 17, 2026
f18f0b7
Close the client connection after faulty response framing
yhirose Oct 17, 2026
079f217
Put Params before the fragment of a client path
yhirose Oct 17, 2026
fb439bd
Split authentication challenges with split_unquoted
yhirose Oct 17, 2026
aa0a588
Answer WebSocket control frames from one place
yhirose Oct 17, 2026
a10338a
Unescape quoted Content-Type parameters and escape backslashes
yhirose Oct 17, 2026
3534228
Serve files without mapping them on POSIX
yhirose Oct 17, 2026
ad6c851
Bound an SSE stream by event only
yhirose Oct 17, 2026
f29721c
Treat 0 as no limit for the remaining limits
yhirose Oct 17, 2026
bf08ec7
Sign the request-target sent in a Digest uri
yhirose Oct 17, 2026
9724ea6
Skip the CN next to a DNS SAN on Mbed TLS and wolfSSL
yhirose Oct 17, 2026
489fe8e
Give a redirect client the CAs its client trusts
yhirose Oct 17, 2026
a7fce92
Let a client resume its session with an OpenSSL mTLS server
yhirose Oct 17, 2026
9a08b01
Turn off session resumption on wolfSSL servers verifying clients
yhirose Oct 17, 2026
28741cb
Keep the TLS error behind a failed read or write in the client's Result
claude Oct 17, 2026
a1d4cce
Reset the client's TLS error per attempt and read it under the reques…
claude Oct 17, 2026
bb13a3b
Rotate ticket keys of the size BoringSSL and LibreSSL take
yhirose Oct 17, 2026
c52881c
Keep client certificates required after setting a verify callback
yhirose Oct 17, 2026
567e099
Keep a verify callback alive while a handshake runs it
yhirose Oct 17, 2026
645bdab
Reject a certificate whose verify callback throws
yhirose Oct 17, 2026
7bf66db
Close the connection after a response body with no length
yhirose Oct 17, 2026
be5043a
Replace the Content-Type along with the content
yhirose Oct 17, 2026
560126b
Accept a Unix socket path with "//" in it
yhirose Oct 17, 2026
8ca46a4
Bound the number of interim responses a client skips
yhirose Oct 17, 2026
a09e00b
Do not resume sessions on an OpenSSL context with a verify callback
yhirose Oct 17, 2026
26febe0
Say why the Digest uri is in origin form
yhirose Oct 17, 2026
cf409f7
Note how multipart names with backslashes are read
yhirose Oct 17, 2026
0b382e3
Merge origin/master
yhirose Oct 17, 2026
2594f17
Drop tests the merge duplicated
yhirose Oct 17, 2026
3b9931a
Keep time_point::max() clear of the Windows max macro
yhirose Oct 17, 2026
f1c5068
Build the tests that throw only with exceptions
yhirose Oct 17, 2026
958f9aa
Take resumable test sessions from the new-session callback
yhirose Oct 17, 2026
d00af3f
Test client cert rejection for PEM memory servers and update_certs_pem
claude Oct 17, 2026
4836eb0
Check both outcomes in the update_certs_pem client cert test
claude Oct 17, 2026
8794063
Check the client certificate in the PEM memory test and skip the CA dir
claude Oct 17, 2026
28f3922
Encode the characters RFC 3986 doesn't allow in a client path
yhirose Oct 17, 2026
e4b3865
Revert "Encode the characters RFC 3986 doesn't allow in a client path"
yhirose Oct 17, 2026
062666f
Fix the warnings clang gives when building the tests
yhirose Oct 18, 2026
e97165b
Spawn a dynamic thread when queued jobs outnumber idle threads
yhirose Oct 18, 2026
7234944
Fix the warnings left in the 32-bit, BoringSSL and MSVC builds
yhirose Oct 18, 2026
7220bdb
Pass the read state to curl by address in the Expect test
yhirose Oct 18, 2026
94cf1b5
Support HTTP proxies in WebSocketClient (#2635)
Hyukya Oct 18, 2026
9bfd2dd
Fix README and docs pages that no longer match the code
yhirose Oct 18, 2026
30879bb
Honor the PEM lengths in PemMemory
yhirose Oct 18, 2026
3744227
Let SSEClient::stop() interrupt a blocked read
yhirose Oct 18, 2026
906a7bf
Keep an accepting verifier from overriding Mbed TLS verification
yhirose Oct 18, 2026
106edcf
Return a 3xx without a Location instead of failing the redirect
yhirose Oct 18, 2026
07edfb8
Do not report a body that ends with the connection as an error
yhirose Oct 18, 2026
2e3cb0f
Parse chunked trailers when the stream API decompresses
yhirose Oct 18, 2026
cc9d674
Dispatch an SSE event with an empty type as "message"
yhirose Oct 18, 2026
1d5f032
Run the pre-routing handler once for an unmatched WebSocket upgrade
yhirose Oct 18, 2026
03fa890
Revert "Let SSEClient::stop() interrupt a blocked read"
yhirose Oct 18, 2026
801bf2e
Let SSEClient::stop() interrupt a blocked read
yhirose Oct 18, 2026
696b94b
Wake a WebSocket read on a pong timeout on every platform
yhirose Oct 18, 2026
344aceb
Run the pong timeout tests in the main test suite
yhirose Oct 18, 2026
d99c697
Report a response body over the limit as ExceedMaxPayloadSize
yhirose Oct 18, 2026
ebcd555
Report each failed client request to the error logger once
yhirose Oct 18, 2026
f17d314
Send the client's credentials and proxy target on a stream request
yhirose Oct 19, 2026
74ef3c4
Release v0.62.0
yhirose Oct 19, 2026
41c85c0
Close the connection on an answered upgrade body in process_request (…
metsw24-max Oct 20, 2026
67b8803
End the stream at the header section for HEAD, 204 and 304 in open_st…
metsw24-max Oct 20, 2026
71b5f0a
Read a NUL-terminated client CA in SSLServer::PemMemory
yhirose Oct 21, 2026
7a9cee0
Drop the SNI of a failed handshake on the Mbed TLS server
yhirose Oct 21, 2026
98647e0
Require client certificates once update_certs_pem() loads a client CA
yhirose Oct 21, 2026
8772d10
Serve only canonical paths from mount points
yhirose Oct 21, 2026
6304fc6
Keep the system CAs out when a custom CA comes through empty
yhirose Oct 21, 2026
fd5dd79
Ready PSA Crypto before parsing a CA store on Mbed TLS 4.x
yhirose Oct 21, 2026
fd71c11
Verify the server certificate during the handshake on OpenSSL
yhirose Oct 22, 2026
5bcfea7
Release v0.63.0
yhirose Oct 22, 2026
247a2ab
Bound the bytes around chunk data in chunked transfer coding
yhirose Oct 22, 2026
3599533
Drop invalid response header fields before any header writer
yhirose Oct 22, 2026
3b8b9cf
Parse a CA store PEM through a NUL-terminated copy on Mbed TLS
yhirose Oct 22, 2026
fc37d3e
Add Server::set_compress() to turn off handler response compression
yhirose Oct 22, 2026
e121385
Reconnect after a TLS setting changes on a kept-alive client
yhirose Oct 22, 2026
1e35f39
Send the chunk overhead test requests whole before they are refused
yhirose Oct 22, 2026
f297616
Note that TLS settings do not pass through a plain HTTP redirect hop
yhirose Oct 22, 2026
b83b385
Match trusted proxies as IP addresses
yhirose Oct 22, 2026
32a0ca8
Ignore Range on requests other than GET and HEAD
yhirose Oct 22, 2026
fbd3e2c
Answer 501 to a request with a transfer coding besides chunked
yhirose Oct 22, 2026
1c91d54
Read no body from an unframed request in builds without TLS too
yhirose Oct 22, 2026
64b5c68
Run RequestWithoutContentLengthOrTransferEncoding on Windows too
yhirose Oct 22, 2026
b8ae3e4
Answer 500 to an exception the exception handler gives no status
yhirose Oct 22, 2026
5db950e
Normalize the extension of a user MIME type mapping when it is set
yhirose Oct 22, 2026
70bed02
Bound how much of an unread request body the server skips
yhirose Oct 22, 2026
b4b2458
Refuse to serve a path segment ending in a dot or a space
yhirose Oct 22, 2026
276cf08
Refuse a proxied path that does not start with a slash (#2638)
metsw24-max Oct 22, 2026
97a972f
Give the issue-2431 job's test step its own time limit
yhirose Oct 22, 2026
7d28b64
Build BoringSSL with clang in the Linux CI job
yhirose Oct 22, 2026
a210b43
Give the ARM cross-compile job's build step its own time limit
yhirose Oct 22, 2026
5ceef83
Open a new connection for a redirect after sending Connection: close …
wleeaf Oct 25, 2026
7d349cb
Follow only 301, 302, 303, 307 and 308 redirects (#2646)
wleeaf Oct 25, 2026
d23d1b6
Match a host name against subjectAltName only
yhirose Oct 25, 2026
76f84a5
Honor set_decompress(false) in response streams (#2640)
harbinresearcher Oct 26, 2026
ba32b46
Honour Keychain trust settings when loading macOS system CAs (#2641)
metsw24-max Oct 26, 2026
391de32
finish short writes in write_websocket_frame and open_stream_ (#2642)
metsw24-max Oct 26, 2026
2f8b9f6
Guard last_event_id() against the async event loop in SSEClient (#2644)
metsw24-max Oct 26, 2026
8710fbd
Refuse a ':' in a path a mount point serves on Windows (#2643)
metsw24-max Oct 26, 2026
252dbaa
Remove dot segments from absolute redirect locations (#2648)
wleeaf Oct 26, 2026
578e481
Treat ':' as a path separator in sanitize_filename on Windows (#2651)
metsw24-max Oct 27, 2026
25ba40f
Reject an EOF without close_notify in the Mbed TLS and wolfSSL read (…
metsw24-max Oct 27, 2026
290c4c0
Add set_tunnel_hostname_addr_map() and deprecate set_hostname_addr_ma…
Hyukya Oct 28, 2026
a0ab09f
Add set_basic_auth and set_bearer_token_auth to WebSocketClient (#2652)
Hyukya Oct 28, 2026
24e58ce
Release v0.64.0
yhirose Oct 29, 2026
a18895f
Let ClientImpl::stop() interrupt a request waiting on Windows (#2653)
yosh-matsuda Oct 30, 2026
453b1b8
keep a relative Location on its host in resolve_relative_location (#2…
metsw24-max Nov 2, 2026
a1ba73a
Cap a send() or wolfSSL_read() length at INT_MAX (#2655)
b84330808 Nov 4, 2026
39c98d4
Ignore a Range header with a unit other than bytes (#2657)
emincan2000 Nov 5, 2026
6df9714
Do not carry Request::params over to a redirect's Location
yhirose Nov 5, 2026
7e5d068
Release v0.65.0
yhirose Nov 5, 2026
6d8dec3
Keep a redirect on the unix socket in ClientImpl::redirect (#2658)
metsw24-max Nov 7, 2026
bd23a7b
Keep the job queued when a dynamic worker thread cannot be created
yhirose Nov 10, 2026
cdcd2ac
Release v0.66.0
yhirose Nov 10, 2026
cc7a30f
Preserve aliased keys when erasing entries (#2659)
astunm Nov 11, 2026
0714225
Extract SSE event stream parsing into detail::SSEParser
yhirose Nov 12, 2026
a39e081
Test SSEParser directly instead of through a server
yhirose Nov 13, 2026
a2ebab1
OSS-Fuzz: Add new fuzzer/options targets websocket (#2663)
arthurscchan Nov 13, 2026
8c5fd6a
OSS-Fuzz: Improve url_parser_fuzzer with more cases (#2664)
arthurscchan Nov 13, 2026
53a7f49
Add sse_parser_fuzzer for detail::SSEParser (#2665)
yhirose Nov 13, 2026
546e821
Add server_mount_fuzzer for static file serving (#2666)
yhirose Nov 13, 2026
f10d71e
Merge remote-tracking branch 'upstream/master'
ksenonadv Nov 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/test/www*/dir/*.html text eol=lf
/test/www*/dir/*.txt text eol=lf
70 changes: 70 additions & 0 deletions .github/workflows/abidiff.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# SPDX-FileCopyrightText: 2025 Andrea Pappacoda <andrea@pappacoda.it>
# SPDX-License-Identifier: MIT

name: abidiff

on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true

defaults:
run:
shell: sh

jobs:
abi:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
container:
image: debian:testing

steps:
- name: Install dependencies
run: apt -y --update install --no-install-recommends
abigail-tools
ca-certificates
g++
git
libbrotli-dev
libssl-dev
libzstd-dev
meson
pkg-config
python3
zlib1g-dev

- uses: actions/checkout@v4
with:
path: current

- uses: actions/checkout@v4
with:
path: previous
fetch-depth: 0

- name: Checkout previous
working-directory: previous
run: |
git switch master
git describe --tags --abbrev=0 master | xargs git checkout

- name: Build current
working-directory: current
run: |
meson setup --buildtype=debug -Dcpp-httplib_compile=true build
ninja -C build

- name: Build previous
working-directory: previous
run: |
meson setup --buildtype=debug -Dcpp-httplib_compile=true build
ninja -C build

- name: Run abidiff
run: abidiff
--headers-dir1 previous/build
--headers-dir2 current/build
previous/build/libcpp-httplib.so
current/build/libcpp-httplib.so
62 changes: 62 additions & 0 deletions .github/workflows/benchmark_ab.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: benchmark-ab

# Manual A/B throughput comparison between two refs.
#
# This is a measurement, not a test: it never fails the build on a slow result.
# Absolute req/s from a shared runner is meaningless on its own, so both refs
# are built and measured alternately in the same job and only the ratio of the
# medians is reported, with a permutation test to say whether the difference
# stands out from the run-to-run noise.
#
# Non-SSL and Linux only for now.

on:
workflow_dispatch:
inputs:
base:
description: "Baseline ref"
required: false
default: "origin/master"
head:
description: "Ref to compare (defaults to the ref this run was started on)"
required: false
default: ""
rounds:
description: "Measurement rounds per ref (9+ recommended; below 4 the test can never reach significance)"
required: false
default: "9"
duration:
description: "Load duration per measurement"
required: false
default: "5s"
connections:
description: "Concurrent connections"
required: false
default: "10"

permissions:
contents: read

jobs:
ubuntu:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: install bombardier
run: go install github.com/codesenberg/bombardier@latest

- name: run A/B benchmark
run: |
export PATH="$(go env GOPATH)/bin:$PATH"
HEAD_REF="${{ inputs.head }}"
if [ -z "$HEAD_REF" ]; then HEAD_REF="${{ github.sha }}"; fi
./benchmark/ab.sh \
--base "${{ inputs.base }}" \
--head "$HEAD_REF" \
--rounds "${{ inputs.rounds }}" \
--duration "${{ inputs.duration }}" \
--connections "${{ inputs.connections }}"
106 changes: 106 additions & 0 deletions .github/workflows/benchmark_run.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: benchmark-run

# Runs the committed benchmark (`just bench`) and records the numbers.
#
# This is a measurement, not a test: nothing here fails the build. Unlike
# benchmark-ab, which compares two refs inside one job, this just reports the
# absolute throughput of the current ref alongside Crow for reference.
#
# Absolute req/s is only meaningful against other runs on the same runner type,
# so compare like with like when reading the history.
#
# Non-SSL only. Windows is excluded: benchmark/Makefile depends on `nc`, `&`
# and `kill`, so it would need a PowerShell rewrite first.

on:
workflow_dispatch:
inputs:
duration:
description: "Load duration per server"
required: false
default: "5s"
connections:
description: "Concurrent connections"
required: false
default: "10"
crow:
description: "Also benchmark Crow v1.3.1 for reference"
type: boolean
required: false
default: true

permissions:
contents: read

jobs:
bench:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: checkout
uses: actions/checkout@v4

# macos runners ship without Go.
- name: setup Go
uses: actions/setup-go@v5
with:
go-version: stable

- name: install bombardier
run: go install github.com/codesenberg/bombardier@latest

# crow_all.h includes <asio.hpp>, which no runner has out of the box.
- name: install asio
if: ${{ inputs.crow }}
run: |
if [ "$RUNNER_OS" = "Linux" ]; then
sudo apt-get update && sudo apt-get install -y libasio-dev
else
brew install asio
fi

- name: run benchmark
run: |
# Without pipefail the `tee` below swallows a build failure and the
# job reports success having measured nothing.
set -o pipefail
export PATH="$(go env GOPATH)/bin:$PATH"
CROW_FLAGS="-std=c++17"
if [ "$RUNNER_OS" = "macOS" ]; then
CROW_FLAGS="$CROW_FLAGS -I$(brew --prefix asio)/include"
fi
if [ "${{ inputs.crow }}" = "true" ]; then TARGET=bench-all; else TARGET=bench; fi
make -C benchmark "$TARGET" \
CROW_CXXFLAGS="$CROW_FLAGS" \
BENCH="bombardier -c ${{ inputs.connections }} -d ${{ inputs.duration }} localhost:8080" \
2>&1 | tee /tmp/bench.txt

# pipefail only catches a failed build. Each Makefile recipe ends in
# `kill`, so a bombardier that never ran still leaves make happy — check
# that the measurements are actually there.
- name: check results were produced
run: |
expected=1
if [ "${{ inputs.crow }}" = "true" ]; then expected=2; fi
got=$(grep -c "Reqs/sec" /tmp/bench.txt || true)
if [ "$got" -lt "$expected" ]; then
echo "::error::expected $expected benchmark result(s), found $got"
exit 1
fi

- name: record results
if: always()
run: |
{
echo "## Benchmark (${{ matrix.os }})"
echo ""
echo "- ref: \`${{ github.ref_name }}\` (${{ github.sha }})"
echo "- connections=${{ inputs.connections }} duration=${{ inputs.duration }}"
echo ""
echo '```'
cat /tmp/bench.txt
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
20 changes: 18 additions & 2 deletions .github/workflows/cifuzz.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
name: CIFuzz
on: [pull_request]

# The fuzzers only build httplib.h and the targets under test/fuzzing, so a
# pull request that touches neither has nothing for CIFuzz to exercise. Fuzzing
# is by far the longest job in CI (10 minutes of fuzzing on top of building the
# OSS-Fuzz image), and skipping it for documentation-only changes keeps the
# full 600 seconds for the pull requests that do reach the parsers.
on:
pull_request:
paths:
- 'httplib.h'
- 'test/fuzzing/**'
- '.github/workflows/cifuzz.yaml'

concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true

jobs:
Fuzzing:
runs-on: ubuntu-latest
Expand All @@ -19,7 +35,7 @@ jobs:
dry-run: false
language: c++
- name: Upload Crash
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: docs
on:
push:
branches: [master]
paths:
- 'docs-src/**'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
with:
# Full history so sitemap <lastmod> reflects each page's real last commit date
fetch-depth: 0
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Install docs-gen
run: cargo install docs-gen
- name: Build
run: docs-gen build docs-src docs
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v3
with:
path: docs
- id: deployment
uses: actions/deploy-pages@v4
51 changes: 51 additions & 0 deletions .github/workflows/release-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Release Docker Image

on:
release:
types: [published]
workflow_dispatch:

jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history and tags

- name: Extract tag (manual)
if: github.event_name == 'workflow_dispatch'
id: set_tag_manual
run: |
# Checkout the latest tag and set output
git fetch --tags
LATEST_TAG=$(git describe --tags --abbrev=0)
git checkout $LATEST_TAG
echo "tag=${LATEST_TAG#v}" >> $GITHUB_OUTPUT

- name: Extract tag (release)
if: github.event_name == 'release'
id: set_tag_release
run: echo "tag=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
platforms: linux/amd64,linux/arm64 # Build for both amd64 and arm64
# Use extracted tag without leading 'v'
tags: |
yhirose4dockerhub/cpp-httplib-server:latest
yhirose4dockerhub/cpp-httplib-server:${{ steps.set_tag_manual.outputs.tag || steps.set_tag_release.outputs.tag }}
Loading
Loading