Skip to content

Conditional requests and single-range static serving - #10

Merged
AgentDudu merged 1 commit into
developfrom
feature/caching-and-range
Oct 20, 2026
Merged

AgentDudu merged 1 commit into
developfrom
feature/caching-and-range

Conversation

@AgentDudu

Copy link
Copy Markdown
Owner

ETag/Last-Modified + If-None-Match/If-Modified-Since (304), single Range (206/416, If-Range, multi-range ignored), Reply per-response headers (405 Allow), new portable http/date parser/formatter. Tests: 304 semantics incl. precedence, 14 range cases, date garbage table. Local: MinGW 473 assertions green; Docker ASan+UBSan green; Docker TSan green (local run needs randomize_va_space=0 for the SIGINT smoke — Docker Desktop ASLR quirk, CI unaffected).

StaticFiles now emits strong ETag (size+mtime) and Last-Modified; If-None-Match
(weak comparison, star, lists) and If-Modified-Since return bodyless 304 before
the file is read, with If-None-Match taking precedence per RFC 7232. Single
byte-ranges serve 206 + Content-Range, past-the-end 416 + bytes */len, If-Range
gates with strong comparison; multi-range, other units and malformed ranges are
ignored per RFC 9110. Reply gained a per-response header list (405 now carries
Allow). New http/date.{h,cpp}: IMF/RFC850/asctime parse + IMF format via
civil-calendar math, no timegm/_mkgmtime portability traps. 44 cases / 473
assertions incl. date garbage table and 14 range cases.
@AgentDudu
AgentDudu merged commit dc05b2c into develop Oct 20, 2026
3 checks passed
@AgentDudu
AgentDudu deleted the feature/caching-and-range branch October 20, 2026 13:45
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