1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-16 07:18:37 +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

@@ -71,7 +71,8 @@ func ServeBlobOrLFS(ctx *context.Context, blob *git.Blob, lastModified time.Time
log.Error("ServeBlobOrLFS: Close: %v", err)
}
}()
return common.ServeData(ctx, ctx.Repo.TreePath, meta.Size, lfsDataRc)
common.ServeContentByReadSeeker(ctx, ctx.Repo.TreePath, lastModified, lfsDataRc)
return nil
}
if err = dataRc.Close(); err != nil {
log.Error("ServeBlobOrLFS: Close: %v", err)