diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2022-08-25 18:05:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-25 12:05:21 -0400 |
commit | dc0253b0637bbf367ad330612900e780c6b2b0e6 (patch) | |
tree | 85a51c2e9b355bef889e6fdae2e71b49fd645fbb /routers/api/packages/npm | |
parent | 5e232e86de6bb26038e0ebaec60368d54a327446 (diff) | |
download | gitea-dc0253b0637bbf367ad330612900e780c6b2b0e6.tar.gz gitea-dc0253b0637bbf367ad330612900e780c6b2b0e6.zip |
Replace `ServeStream` with `ServeContent` (#20903)
* Replace ServeStream with ServeContent.
* Update modules/timeutil/timestamp.go
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'routers/api/packages/npm')
-rw-r--r-- | routers/api/packages/npm/npm.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/packages/npm/npm.go b/routers/api/packages/npm/npm.go index d5ba70f964..66b999d47e 100644 --- a/routers/api/packages/npm/npm.go +++ b/routers/api/packages/npm/npm.go @@ -103,7 +103,7 @@ func DownloadPackageFile(ctx *context.Context) { } defer s.Close() - ctx.ServeStream(s, pf.Name) + ctx.ServeContent(pf.Name, s, pf.CreatedUnix.AsLocalTime()) } // UploadPackage creates a new package |