go-chi / go-chi/chi

NoCache middlewares should not remove preconditions from request

Open
#801 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
22.8k
Forks
1.2k
Avg merge
5h 17m
Merged PRs (30d)
10

Description

NoCache middleware [removes](https://github.com/go-chi/chi/blob/master/middleware/nocache.go#L42) preconditions from request but describes itself as cache disabling middleware. According to https://www.rfc-editor.org/rfc/rfc7232 preconditions may be used for protection against lost updates even when no caching is enabled for resource.

NoCache middleware should touch only response headers not request headers probably and should not block headers required for conditional requests to work.

Contributor guide

Open the contributing guide

Research direction

Start in middleware/nocache.go at the linked line and read the RFC 7232 discussion of preconditions. Verify which request and response headers the middleware changes; done means conditional request preconditions remain available while cache-disabling response behavior is preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.