aboutsummaryrefslogtreecommitdiffstats
path: root/modules/lfs/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/lfs/server.go')
-rw-r--r--modules/lfs/server.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/lfs/server.go b/modules/lfs/server.go
index b093213643..226bcbf55a 100644
--- a/modules/lfs/server.go
+++ b/modules/lfs/server.go
@@ -413,9 +413,8 @@ func PutHandler(ctx *context.Context) {
}
contentStore := &ContentStore{ObjectStorage: storage.LFS}
- bodyReader := ctx.Req.Body().ReadCloser()
- defer bodyReader.Close()
- if err := contentStore.Put(meta, bodyReader); err != nil {
+ defer ctx.Req.Request.Body.Close()
+ if err := contentStore.Put(meta, ctx.Req.Request.Body); err != nil {
// Put will log the error itself
ctx.Resp.WriteHeader(500)
if err == errSizeMismatch || err == errHashMismatch {