🎧 Your Personal Streaming Service
Go airsonicmadsonicmedia-servermusicmusic-servernavidromeopensubsonicraspberry-piself-hostedstreamerstreaming-apistreaming-audiosubsonicsubsonic-server
fix(server): use http.TimeFormat for Last-Modified header (#5219)
Simon Teixidor8f05f7815eb9
diff --git a/server/public/handle_images.go b/server/public/handle_images.goindex f4985dea5..50f9238e5 100644--- a/server/public/handle_images.go+++ b/server/public/handle_images.go@@ -60,7 +60,7 @@ func (pub *Router) handleImages(w http.ResponseWriter, r *http.Request) {defer imgReader.Close()w.Header().Set("Cache-Control", "public, max-age=315360000")- w.Header().Set("Last-Modified", lastUpdate.Format(time.RFC1123))+ w.Header().Set("Last-Modified", lastUpdate.Format(http.TimeFormat))cnt, err := io.Copy(w, imgReader)if err != nil {log.Warn(ctx, "Error sending image", "count", cnt, err)diff --git a/server/subsonic/media_retrieval.go b/server/subsonic/media_retrieval.goindex 54fcb5e3a..3faae1650 100644--- a/server/subsonic/media_retrieval.go+++ b/server/subsonic/media_retrieval.go@@ -81,7 +81,7 @@ func (api *Router) GetCoverArt(w http.ResponseWriter, r *http.Request) (*responsdefer imgReader.Close()w.Header().Set("cache-control", "public, max-age=315360000")- w.Header().Set("last-modified", lastUpdate.Format(time.RFC1123))+ w.Header().Set("last-modified", lastUpdate.Format(http.TimeFormat))cnt, err := io.Copy(w, imgReader)if err != nil {