forked from forgejo/forgejo
Make repository response support HTTP range request (#24592)
Replace #20480 Replace #18448 Close #16414
This commit is contained in:
parent
c090f87a8d
commit
023a048f52
12 changed files with 434 additions and 212 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue