Skip to content

Static files, write cap, slow-client + pipelining tests - #8

Merged
AgentDudu merged 1 commit into
developfrom
feature/static-files
Oct 20, 2026
Merged

AgentDudu merged 1 commit into
developfrom
feature/static-files

Conversation

@AgentDudu

Copy link
Copy Markdown
Owner

StaticFiles handler (decode-before-resolve, traversal/absolute/backslash 404, weakly_canonical + case-folded containment, index/MIME/405/HEAD). Reply-based handlers, 500 seam guard. max_queued_bytes throttle with POLLOUT/read resume; slow-loris 408 + 10x burst under 100-byte cap tests. Fixed readResponse carry bug. clang-format applied tree-wide (gate now live, clang-format on PATH). Gates: Windows ck.ps1 green (format check ran), Linux ASan+UBSan container green incl. updated smoke. CI adds TSan.

…t tests

StaticFiles: strict percent-decode before resolution; traversal/encoded/backslash/absolute refused 404 pre-disk; weakly_canonical symlink containment, case-folded on Windows; index, MIME, 405, HEAD honest Content-Length. Handler now returns Reply{status,content_type,body}; handler exceptions become 500 at the reactor seam.

Slow-client limits: per-connection max_queued_bytes caps the output buffer; a throttle stops reading (real flow control), POLLOUT or next read resumes the drain. Slow-loris partial head -> 408 test; 10-request pipelined burst through a 100-byte cap test.

Test harness: readResponse now honors carry-over of coalesced pipelined responses (recv-after-check, not recv-before-check). Container smoke serves a scratch root and asserts traversal 404.

Tree-wide clang-format applied (175 latent violations; clang-format 23.1.2 now on PATH); ck.ps1 format gate is live.
@AgentDudu
AgentDudu merged commit 185758b into develop Oct 20, 2026
3 checks passed
@AgentDudu
AgentDudu deleted the feature/static-files branch October 20, 2026 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant