1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-05-11 05:55:29 +00:00

Make repository response support HTTP range request (#24592)

Replace #20480
Replace #18448

Close #16414
This commit is contained in:
wxiaoguang
2023-05-09 15:34:36 +08:00
committed by GitHub
parent c090f87a8d
commit 023a048f52
12 changed files with 434 additions and 212 deletions

View File

@ -153,10 +153,7 @@ func ServeAttachment(ctx *context.Context, uuid string) {
}
defer fr.Close()
if err = common.ServeData(ctx, attach.Name, attach.Size, fr); err != nil {
ctx.ServerError("ServeData", err)
return
}
common.ServeContentByReadSeeker(ctx, attach.Name, attach.CreatedUnix.AsTime(), fr)
}
// GetAttachment serve attachments