Return `Last-Modified` header in response for compatibility with Live.js
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Inizia individuando la gestione delle risposte per i file statici e il relativo percorso delle richieste HEAD in babashka.http-server. Confronta il comportamento necessario con ring.middleware.not-modified, quindi verifica che le risposte includano Last-Modified basato sul file servito, in modo che Live.js non dipenda da Content-Length.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I can contribute a PR here if desired. Just want to document the bug first.
Description:
babashka.http-server is used with Live.js to hot-reload changes to HTML, CSS, and JS. It uses HEAD requests to check the following headers: Etag, Last-Modified, Content-Length, and Content-Type.
Problem:
babashka.http-server doesn't return Last-Modified headers in the HTTP response. This means Live.js will fall back to using Content-Length to determine if there are new changes. It's possible for this to cause missed reloads since some changes (such as changing an integer in CSS) will result in the same Content-Length even though the content has changed.
When I use python3 -m http.server to serve the same files, I don't miss any changes even if the output file length is the same.
Solution:
Use ring.middleware.not-modified or something similar to add the Last-Modified to the HTTP responses.
- Lingua principale
- Clojure
- Stelle
- 86
- Fork
- 12
- Merge medio
- 1m
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né 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.
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
nextjournal/clerk#830 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
IOP tokens release blocker team qa team qa autotests WG adoption
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
penpot/penpot#13540 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
izhangzhihao/intellij-rainbow-brackets#2903 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100