Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
1e3d11d
refactor: rename th_string to th_str, th_heap_string to th_string
RaphiaRa Jul 30, 2026
363a009
build: add opt-in gcov/gcovr coverage target
RaphiaRa Jul 30, 2026
673f888
refactor: inject th_clock into th_timer, add th_timer_from_duration/r…
RaphiaRa Jul 30, 2026
6283290
test: re-run test function per case for fresh fixture state
RaphiaRa Jul 30, 2026
c7d5dc6
feat: add th_reactor/th_handle/th_loop and a testable poll reactor
RaphiaRa Jul 31, 2026
2a7e3d0
feat: add th_socket ops-vtable with th_recv/send/sendvec/sendfile
RaphiaRa Jul 31, 2026
46f9377
feat: add th_acceptor ops-vtable with th_accept
RaphiaRa Jul 31, 2026
19d3627
refactor: port th_conn/th_tcp_conn onto th_socket, cut over event loop
RaphiaRa Jul 31, 2026
6ba2a7a
refactor: make th_dir testable via dependency injection
RaphiaRa Aug 2, 2026
fe9ee13
refactor: decouple th_fcache from th_dir_mgr
RaphiaRa Aug 2, 2026
cad68e3
refactor: drop realpath/jail-check validation from th_file_openat
RaphiaRa Aug 2, 2026
beaec88
feat: give th_file an ops-vtable, drop TH_CONFIG_OS_MOCK entirely
RaphiaRa Aug 2, 2026
2b0624a
fix: two resubmit bugs in th_poll's submit/run
RaphiaRa Aug 2, 2026
f8ff521
refactor: drop mmap sendfile fallback
RaphiaRa Aug 2, 2026
16068d0
test: add th_upload coverage, drop its unused fcache dependency
RaphiaRa Aug 3, 2026
cc11305
refactor: drop th_request's unused th_fcache dependency
RaphiaRa Aug 3, 2026
b00ea00
test: hoist shared request/parser init in th_request_parser_test
RaphiaRa Aug 3, 2026
036ba17
test: add th_http_test covering request-to-response wiring
RaphiaRa Aug 3, 2026
451d814
test: cover partial header/body reads in th_http_test
RaphiaRa Aug 3, 2026
999d947
test: cover OPTIONS handling in th_http_test
RaphiaRa Aug 3, 2026
20dbefb
test: cover th_fcache_erase's two eviction paths
RaphiaRa Aug 3, 2026
406d340
test: add cookie parsing coverage to th_request_parser_test
RaphiaRa Aug 3, 2026
4f74cd3
refactor: extract cookie parsing into th_cookie_parser
RaphiaRa Aug 3, 2026
33817ee
refactor: link tests against tiny_http instead of recompiling sources
RaphiaRa Aug 3, 2026
c7578ad
fix: initialize th_loop's reactor_task before use
RaphiaRa Aug 3, 2026
1607ce3
feat: add TH_ENABLE_UBSAN option
RaphiaRa Aug 3, 2026
737f35d
fix: avoid int-to-char truncation warning in th_url_decode
RaphiaRa Aug 3, 2026
383ec02
refactor: extract multipart parsing into th_multipart_parser
RaphiaRa Aug 4, 2026
404255f
feat: add th_bench microbenchmark harness
RaphiaRa Aug 4, 2026
83a3156
perf: speed up th_str_find_first and th_str_find_first_of
RaphiaRa Aug 4, 2026
2c47943
refactor: keep bench fixture setup next to its case, not hoisted to f…
RaphiaRa Aug 4, 2026
63de447
perf: use memcmp in th_str_eq
RaphiaRa Aug 4, 2026
9065dfa
test: add th_cookie_parser bench cases
RaphiaRa Aug 4, 2026
10f53a2
feat!: replace th_upload with th_part
RaphiaRa Aug 4, 2026
4047c2f
fix: prefer virtualenv Python3 when locating networkx for amalgamation
RaphiaRa Aug 4, 2026
4fd9c38
chore: make amalgamate.py executable
RaphiaRa Aug 4, 2026
2241683
fix: guard small-string shrink in th_string_resize
RaphiaRa Aug 4, 2026
f2b7c38
fix: correct trail advance length in router segment matching
RaphiaRa Aug 4, 2026
6b4e529
refactor: drop router test globals in favor of per-route user_data
RaphiaRa Aug 4, 2026
b6ab17a
test: expand request parser coverage for malformed input
RaphiaRa Aug 4, 2026
d78d31d
perf: batch literal runs in th_url_decode_string
RaphiaRa Aug 4, 2026
ee7c2be
fix: add stricter compiler warnings, fix issues they surface
RaphiaRa Aug 4, 2026
adbb259
refactor: split path validation into th_filepath, thin th_file ops
RaphiaRa Aug 6, 2026
d499b37
refactor: make th_save_to_disk a server method
RaphiaRa Aug 7, 2026
22b6b90
refactor: remove th_server's bucket allocator
RaphiaRa Aug 7, 2026
b3b1200
test: add th_hashmap benchmark
RaphiaRa Aug 7, 2026
871267d
refactor: accept directly into th_socket instead of raw fd
RaphiaRa Aug 8, 2026
51141d6
feat: add SSL/TLS support via th_ssl_conn
RaphiaRa Aug 8, 2026
d534452
fix: probe extra warning flags before enabling them
RaphiaRa Aug 8, 2026
4e9a5a2
fix: cast iovlen to int for msghdr on macOS
RaphiaRa Aug 8, 2026
f01e06e
fix: silence -Wformat-nonliteral in th_printf_body
RaphiaRa Aug 9, 2026
ef485f7
fix: resolve compile errors on clang
RaphiaRa Aug 9, 2026
eabeca4
build: make linking to openssl public
RaphiaRa Aug 9, 2026
a85e882
chore: update amalgamation
RaphiaRa Aug 9, 2026
d2cda4c
build: make amalgamation opt-in via TH_ENABLE_AMALGAMATION
RaphiaRa Aug 9, 2026
55fb3f3
ci: enable asan+ubsan and coverage
RaphiaRa Aug 9, 2026
db30a29
ci: fix codecov v4 upload via gcovr XML instead of gcov input
RaphiaRa Aug 9, 2026
086130a
build: exclude bench and gperf-generated sources from coverage
RaphiaRa Aug 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ BraceWrapping:
BeforeCatch: false
BeforeElse: false
IndentBraces: false
StatementMacros: [ 'TH_TEST_BEGIN(name)', 'TH_TEST_END' , 'TH_TEST_CASE_BEGIN(name)', 'TH_TEST_CASE_END' , 'TH_EXPECT(x)', 'TH_STRING(x)']
StatementMacros: [ 'TH_TEST_BEGIN(name)', 'TH_TEST_END' , 'TH_TEST_CASE_BEGIN(name)', 'TH_TEST_CASE_END' , 'TH_EXPECT(x)', 'TH_STRING(x)', 'TH_BENCH_BEGIN(name)', 'TH_BENCH_END', 'TH_BENCH_CASE_BEGIN(name, iterations)', 'TH_BENCH_CASE_END', 'TH_BENCH_RUN_BEGIN', 'TH_BENCH_RUN_END']
37 changes: 28 additions & 9 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,38 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y build-essential gperf
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install Python dependencies
run: |
pip install -r requirements.txt
- name: Build
run: |
mkdir build; cd build
cmake .. -DPython3_EXECUTABLE==$(which python)
cmake .. -DCMAKE_BUILD_TYPE=Debug -DTH_ENABLE_ASAN=ON -DTH_ENABLE_UBSAN=ON
make -j$(nproc)
- name: Test
run: |
cd build
ctest
ctest --output-on-failure

coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential gperf
pip install gcovr
- name: Build with coverage
run: |
mkdir build; cd build
cmake .. -DTH_ENABLE_COVERAGE=ON
make -j$(nproc)
- name: Generate coverage report
run: |
cd build
make coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: build/coverage/coverage.xml
fail_ci_if_error: true
11 changes: 2 additions & 9 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,12 @@ jobs:
- name: Install dependencies
run: |
brew install gperf
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install Python dependencies
run: |
pip install -r requirements.txt
- name: Build
run: |
mkdir build; cd build
cmake .. -DPython3_EXECUTABLE==$(which python)
cmake .. -DCMAKE_BUILD_TYPE=Debug -DTH_ENABLE_ASAN=ON -DTH_ENABLE_UBSAN=ON
make -j$(nproc)
- name: Test
run: |
cd build
ctest
ctest --output-on-failure
Loading
Loading