feat(fileserver): add Content-Digest header support (RFC 9530) - #7937
feat(fileserver): add Content-Digest header support (RFC 9530)#7937VedantMadane wants to merge 7 commits into
Conversation
|
Quick note. We need an AI assistance disclosure and CLA to be signed. although CLA assistant can be annoying sometimes, its fixed now :D |
steadytao
left a comment
There was a problem hiding this comment.
Always nice to align with RFCs but we need to do it to-the-letter when doing so. This should also have far more tests; verify exact digest values and add integration coverage for GET, HEAD, 304, ranges, precompressed responses and read/seek failures. In particular, a 206 digest must cover the selected representation data rather than the complete source file.
|
I think this can cause the sendfile optimization to be disabled when used (but only for an HTTP server, no TLS because we don't have kTLS yet).
Should be noted in the docs. |
|
Thank you @steadytao and @francislavoie for the detailed feedback! I have updated the PR to address all your points:
|
Validate and deduplicate content_digest algorithms in Caddyfile and Provision. Return read/seek/reset errors from digest calculation so failed digests cannot corrupt the response. Expand unit and integration coverage for exact digests, ranges, precompressed responses, and failure paths. Document sendfile impact in Caddyfile docs.
Summary
Fixes #7901
This PR adds optional RFC 9530 Content-Digest header generation to the ile_server handler for static file responses.
Details