aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/packages/pub/pub.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/packages/pub/pub.go')
-rw-r--r--routers/api/packages/pub/pub.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/routers/api/packages/pub/pub.go b/routers/api/packages/pub/pub.go
index 635147b6d0..26cb9fbb9a 100644
--- a/routers/api/packages/pub/pub.go
+++ b/routers/api/packages/pub/pub.go
@@ -275,5 +275,8 @@ func DownloadPackageFile(ctx *context.Context) {
}
defer s.Close()
- ctx.ServeContent(pf.Name, s, pf.CreatedUnix.AsLocalTime())
+ ctx.ServeContent(s, &context.ServeHeaderOptions{
+ Filename: pf.Name,
+ LastModified: pf.CreatedUnix.AsLocalTime(),
+ })
}