forked from forgejo/forgejo
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>
This commit is contained in:
parent
5e232e86de
commit
dc0253b063
17 changed files with 31 additions and 41 deletions
|
@ -468,7 +468,8 @@ func download(ctx *context.Context, archiveName string, archiver *repo_model.Rep
|
|||
return
|
||||
}
|
||||
defer fr.Close()
|
||||
ctx.ServeStream(fr, downloadName)
|
||||
|
||||
ctx.ServeContent(downloadName, fr, archiver.CreatedUnix.AsLocalTime())
|
||||
}
|
||||
|
||||
// InitiateDownload will enqueue an archival request, as needed. It may submit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue