mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-02 11:36:05 +01:00
Fix wrong file size issue when cloning and pulling contents via git-lfs. (#2330)
This commit is contained in:
@@ -28,7 +28,7 @@ class GitLfsTransferServlet extends HttpServlet {
|
||||
if (file.exists()) {
|
||||
res.setStatus(HttpStatus.SC_OK)
|
||||
res.setContentType("application/octet-stream")
|
||||
res.setContentLength(file.length.toInt)
|
||||
res.setHeader("Content-Length", file.length.toString)
|
||||
using(new FileInputStream(file), res.getOutputStream) { (in, out) =>
|
||||
IOUtils.copy(in, out)
|
||||
out.flush()
|
||||
|
||||
Reference in New Issue
Block a user