aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorLibravatar Rutger Broekhoff2024-01-02 19:00:16 +0100
committerLibravatar Rutger Broekhoff2024-01-02 19:00:16 +0100
commitbc8925ceeb0edb611abd66ac5ca25f939119690c (patch)
tree95dc0ad05bf466e7978ab97ff4df7ce2fb9d5266 /cmd
parent8db41da676ac8368ef7c2549d56239a5ff5eedde (diff)
downloadgitolfs3-bc8925ceeb0edb611abd66ac5ca25f939119690c.tar.gz
gitolfs3-bc8925ceeb0edb611abd66ac5ca25f939119690c.zip
Return after makeRespError; add notice in README.txt
Diffstat (limited to 'cmd')
-rw-r--r--cmd/git-lfs-server/main.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/git-lfs-server/main.go b/cmd/git-lfs-server/main.go
index b13f997..e5c0788 100644
--- a/cmd/git-lfs-server/main.go
+++ b/cmd/git-lfs-server/main.go
@@ -484,11 +484,13 @@ func (h *handler) handleGetObject(w http.ResponseWriter, r *http.Request, repo,
484 if err != nil { 484 if err != nil {
485 reqlog(ctx, "Failed to stat: %s", err) 485 reqlog(ctx, "Failed to stat: %s", err)
486 makeRespError(ctx, w, "Internal server error", http.StatusInternalServerError) 486 makeRespError(ctx, w, "Internal server error", http.StatusInternalServerError)
487 return
487 } 488 }
488 489
489 if stat.Size != claims.Gitolfs3.Size { 490 if stat.Size != claims.Gitolfs3.Size {
490 reqlog(ctx, "Claims size does not match S3 object size") 491 reqlog(ctx, "Claims size does not match S3 object size")
491 makeRespError(ctx, w, "Internal server error", http.StatusInternalServerError) 492 makeRespError(ctx, w, "Internal server error", http.StatusInternalServerError)
493 return
492 } 494 }
493 495
494 w.Header().Set("Content-Length", strconv.FormatInt(claims.Gitolfs3.Size, 10)) 496 w.Header().Set("Content-Length", strconv.FormatInt(claims.Gitolfs3.Size, 10))