diff options
author | Jacob Parry <jacob@jacobparry.ca> | 2017-11-06 23:33:04 -0500 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2017-11-07 06:33:04 +0200 |
commit | 6e2e7b325f9902cd9e86c089ddece83d6be7eb1c (patch) | |
tree | eb8dc89416573675ac01ec82b7ae8da0eff59653 /modules/lfs/server.go | |
parent | cdc46007255c0f6161aed6ec4ee7e0e11cf299e7 (diff) | |
download | gitea-6e2e7b325f9902cd9e86c089ddece83d6be7eb1c.tar.gz gitea-6e2e7b325f9902cd9e86c089ddece83d6be7eb1c.zip |
Fix LFS not returning correct content length when requesting a range of bytes (#2864)
Diffstat (limited to 'modules/lfs/server.go')
-rw-r--r-- | modules/lfs/server.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/lfs/server.go b/modules/lfs/server.go index 1a15aba001..d618d61853 100644 --- a/modules/lfs/server.go +++ b/modules/lfs/server.go @@ -152,7 +152,7 @@ func getContentHandler(ctx *context.Context) { return } - ctx.Resp.Header().Set("Content-Length", strconv.FormatInt(meta.Size, 10)) + ctx.Resp.Header().Set("Content-Length", strconv.FormatInt(meta.Size-fromByte, 10)) ctx.Resp.Header().Set("Content-Type", "application/octet-stream") filename := ctx.Params("filename") |