go-chi / chi

lightweight, idiomatic and composable router for building Go HTTP services
https://go-chi.io
MIT License
18.34k stars 983 forks source link

NoCache middlewares should not remove preconditions from request #801

Open pboguslawski opened 1 year ago

pboguslawski commented 1 year ago

NoCache middleware removes 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.

VojtechVitek commented 3 weeks ago

Hi @pboguslawski,

It looks like you have closed #804 PR. Is this issue still valid?

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

Can you please elaborate on the word probably? I'm reading this issue for the first time without having dived into RFC-7232 in detail and I'm trying to understand if there are any action items.

Thanks

pboguslawski commented 3 weeks ago

It looks like you have closed https://github.com/go-chi/chi/pull/804 PR. Is this issue still valid?

No I didn't. Not my PR.

Can you please elaborate on the word probably?

probably = not sure = should be verified by this middleware autor (why it was designed like this)

I'm trying to understand if there are any action items

Issue is still open and should be fixed IMHO.