mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-06-01 15:55:15 +08:00
@ -134,7 +134,9 @@ func DownloadHandler(ctx *context.Context) {
|
||||
}
|
||||
|
||||
contentLength := toByte + 1 - fromByte
|
||||
ctx.Resp.Header().Set("Content-Length", strconv.FormatInt(contentLength, 10))
|
||||
contentLengthStr := strconv.FormatInt(contentLength, 10)
|
||||
ctx.Resp.Header().Set("Content-Length", contentLengthStr)
|
||||
ctx.Resp.Header().Set("X-Gitea-LFS-Content-Length", contentLengthStr) // we need this header to make sure it won't be affected by reverse proxy or compression
|
||||
ctx.Resp.Header().Set("Content-Type", "application/octet-stream")
|
||||
|
||||
filename := ctx.PathParam("filename")
|
||||
|
Reference in New Issue
Block a user