REST downloads from the S3 backend drop ETag and Cache-Control on 304 responses
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- aws, typescript
Direzione di ricerca
Start with Renderer.render() and its error branch, then compare the S3 backend’s 304 handling with the file backend’s setHeaders() path and the existing S3 protocol GetObject handling. Reproduce with a stub upstream returning 304 and ETag, Cache-Control, and Last-Modified; done means the REST download’s 304 preserves the headers expected for the corresponding 200 response. Pull request #1653 is already open for this issue.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Bug report
With the S3 storage backend, a REST object download that revalidates with If-None-Match gets a bare 304 Not Modified. The response has no ETag, Cache-Control or Last-Modified. RFC 9110 section 15.4.5 requires a 304 to carry the ETag and Cache-Control that a 200 would have sent.
The AWS SDK throws on a 304, so Renderer.render() handles it in its error branch. That branch only sets Vary before it sends the 304. The file backend returns its 304 as a value, so it goes through setHeaders() and keeps these headers. The S3 protocol GetObject path already copies them from the SDK error's raw response.
To reproduce
- Run Storage with
STORAGE_BACKEND=s3and uploadbucket/object.txtto a public bucket. GET /object/public/bucket/object.txtand note theETag.- Send the same request with
If-None-Match: <that ETag>.
A unit test that points S3Backend at a stub upstream, which answers the conditional request with 304 plus ETag, Cache-Control and Last-Modified, gets this at upstream b74897cf:
statusCode: 304
etag: undefined
Expected behavior
The 304 carries the upstream ETag and Last-Modified, and the same Cache-Control (or signed URL Expires) that the 200 response would have. Browsers and CDNs then keep the stored validator and refresh its freshness instead of revalidating on every request.
Scope
This covers the REST renderer for downloads through the S3 backend. #1511/#1512 cover response overrides on S3 protocol 304s, and #1607 covers HeadObject conditionals.
- Lingua principale
- TypeScript
- Stelle
- 1.4k
- Fork
- 319
- Merge medio
- 1g 11h
- PR unite (30g)
- 95
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di supabase/storage
-
S3 CreateBucket returns BucketAlreadyExists for a bucket the project already ownsForse già presa @ferhatelmas l’ha presa 4 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
supabase/storage#1656 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
The sample application in storage article points to wrong URLForse di nuovo libera @prasadf18 l’ha presa 212 giorni fa e non c’è nessuna pull request aperta. Apertadocumentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
supabase/storage#557 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
FILE_SIZE_LIMIT is parsed with bare Number(), so a non-numeric value becomes NaN and silently disables the upload size limitForse già presa @aniketatgithub l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 25/100
supabase/storage#1679 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 54/100
I maintainer di solito rispondono entro 1 giorno
-
TUS uploads ignore a bucket file_size_limit of 0Forse già presa @hsusul l’ha presa 4 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di supabase/storage
Issue simili
-
Recording drops clicks on links, filters and checkboxes that share a form with a search fieldForse già presa @columbia11 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Tencent/BrowserSkill#657 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
I maintainer di solito rispondono entro 2 giorni
-
Choosing a folder while continuing an Antigravity session submits a history fork the runtime rejectsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 87/100
-
ai-handle
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
nextlevelbuilder/dewee-web-v2#138 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
NEARBuilders/citynode.app#512 ·
I maintainer di solito rispondono entro 1 giorno