Skip to content

Make serveReaderFast ETag-aware (low priority) #335

Description

@alecthomas

Follow-up from the ETag support assessment (label: etag-range-followup). Low priority / optimisation, not correctness.

internal/strategy/git/snapshot.go:serveReaderFast calls http.ServeContent with a zero ModTime and empty name, and only for *os.File readers, which neutralises the built-in conditional and range handling in ServeContent.

Work

Set the ETag (and use it consistently) so ServeContent can perform 304/range responses natively for file-backed snapshots.

Acceptance

File-backed snapshot serving returns 304 for a matching If-None-Match and honours Range via ServeContent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    etag-range-followupETag/Range support assessment follow-ups (2026-06)

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions