From 2b904b8b76fe265b4a9a6b548727ff80d555c5d3 Mon Sep 17 00:00:00 2001 From: Azareal Date: Sat, 7 Mar 2020 08:11:13 +1000 Subject: [PATCH] avoid embarrassment --- routes/misc.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/routes/misc.go b/routes/misc.go index 8e4e1bf7..4a7d706a 100644 --- a/routes/misc.go +++ b/routes/misc.go @@ -40,6 +40,7 @@ func StaticFile(w http.ResponseWriter, r *http.Request) { h.Set("Content-Encoding", "gzip") h.Set("Content-Length", file.StrGzipLength) http.ServeContent(w, r, r.URL.Path, file.Info.ModTime(), bytes.NewReader(file.GzipData)) + return } else if file.GzipLength == 0 { if len(file.Sha256) != 0 { h.Set("Cache-Control", cacheControlMaxAgeWeek) @@ -48,6 +49,7 @@ func StaticFile(w http.ResponseWriter, r *http.Request) { } h.Set("Content-Length", file.StrLength) http.ServeContent(w, r, r.URL.Path, file.Info.ModTime(), bytes.NewReader(file.Data)) + return } } }