Return `Last-Modified` header in response for compatibility with Live.js
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Comienza localizando el manejo de respuestas de archivos estáticos y su ruta de solicitudes HEAD en babashka.http-server. Compara el comportamiento necesario con ring.middleware.not-modified y verifica después que las respuestas incluyan Last-Modified basado en el archivo servido, para que Live.js no dependa de Content-Length.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Clojure
- Estrellas
- 86
- Forks
- 12
- Merge medio
- 1 min
- PR fusionados (30 d)
- 1
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Issues similares
-
Build fails with `compile-css`Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
nextjournal/clerk#830 ·
-
nREPL server never answers a request with non-ASCII text that arrives in more than one chunkAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
IOP tokens release blocker team qa team qa autotests WG adoption
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
penpot/penpot#13540 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
izhangzhihao/intellij-rainbow-brackets#2903 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100