Make serveReaderFast ETag-aware (low priority)

Open Beginner friendly
#335 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
75/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Quiet
Tech stack
go

Research direction

Read internal/strategy/git/snapshot.go, starting at serveReaderFast and its http.ServeContent call. Run the existing snapshot-serving tests, then verify that file-backed snapshots return 304 for a matching If-None-Match and honor Range requests through ServeContent.

Written by the indexing model from the issue text.

Description

etag-range-followup

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.

Dominant language
Go
Stars
41
Forks
14
Avg merge
23h 22m
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from block/cachew

All issues in block/cachew

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.