summaryrefslogtreecommitdiffstats
path: root/routers/common
diff options
context:
space:
mode:
Diffstat (limited to 'routers/common')
-rw-r--r--routers/common/repo.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/routers/common/repo.go b/routers/common/repo.go
index b0e14b63f5..d037e151f9 100644
--- a/routers/common/repo.go
+++ b/routers/common/repo.go
@@ -10,6 +10,7 @@ import (
"path"
"path/filepath"
"strings"
+ "time"
"code.gitea.io/gitea/modules/charset"
"code.gitea.io/gitea/modules/context"
@@ -22,8 +23,8 @@ import (
)
// ServeBlob download a git.Blob
-func ServeBlob(ctx *context.Context, blob *git.Blob) error {
- if httpcache.HandleGenericETagCache(ctx.Req, ctx.Resp, `"`+blob.ID.String()+`"`) {
+func ServeBlob(ctx *context.Context, blob *git.Blob, lastModified time.Time) error {
+ if httpcache.HandleGenericETagTimeCache(ctx.Req, ctx.Resp, `"`+blob.ID.String()+`"`, lastModified) {
return nil
}