aboutsummaryrefslogtreecommitdiffstats
path: root/modules/public/public.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/public/public.go')
-rw-r--r--modules/public/public.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/modules/public/public.go b/modules/public/public.go
index 0c0e6dc1cc..ed38d85cfa 100644
--- a/modules/public/public.go
+++ b/modules/public/public.go
@@ -97,10 +97,6 @@ func handleRequest(w http.ResponseWriter, req *http.Request, fs http.FileSystem,
return true
}
- if httpcache.HandleFileETagCache(req, w, fi) {
- return true
- }
-
serveContent(w, req, fi, fi.ModTime(), f)
return true
}
@@ -124,11 +120,11 @@ func serveContent(w http.ResponseWriter, req *http.Request, fi os.FileInfo, modt
w.Header().Set("Content-Type", "application/octet-stream")
}
w.Header().Set("Content-Encoding", "gzip")
- http.ServeContent(w, req, fi.Name(), modtime, rdGzip)
+ httpcache.ServeContentWithCacheControl(w, req, fi.Name(), modtime, rdGzip)
return
}
}
- http.ServeContent(w, req, fi.Name(), modtime, content)
+ httpcache.ServeContentWithCacheControl(w, req, fi.Name(), modtime, content)
return
}