0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-08-20 09:35:58 +02:00

Fix LFS range size header response (#35277) (#35293)

Backport #35277 by @LePau

Fix #35276

Signed-off-by: LePau <101608950+LePau@users.noreply.github.com>
Co-authored-by: LePau <101608950+LePau@users.noreply.github.com>
This commit is contained in:
Giteabot 2025-08-17 20:59:03 +08:00 committed by GitHub
parent ac03e65cf4
commit 0266ee5de7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -111,7 +111,7 @@ func DownloadHandler(ctx *context.Context) {
}
}
ctx.Resp.Header().Set("Content-Range", fmt.Sprintf("bytes %d-%d/%d", fromByte, toByte, meta.Size-fromByte))
ctx.Resp.Header().Set("Content-Range", fmt.Sprintf("bytes %d-%d/%d", fromByte, toByte, meta.Size))
ctx.Resp.Header().Set("Access-Control-Expose-Headers", "Content-Range")
}
}