From bc8925ceeb0edb611abd66ac5ca25f939119690c Mon Sep 17 00:00:00 2001 From: Rutger Broekhoff Date: Tue, 2 Jan 2024 19:00:16 +0100 Subject: Return after makeRespError; add notice in README.txt --- README.txt | 6 ++++++ cmd/git-lfs-server/main.go | 2 ++ 2 files changed, 8 insertions(+) diff --git a/README.txt b/README.txt index 75d9e97..4a9261b 100644 --- a/README.txt +++ b/README.txt @@ -3,3 +3,9 @@ gitolfs3 Yes, this is indeed an integration between Gitolite, Git LFS and Scaleway Object Storage. + +To be honest, the code is pretty bad right now and solely serves my needs. +Although I will be doing some cleanups, I have no interest in making this +program work for people with different use cases than me. In case you want to +use this software, feel free to, but expect that you will basically have to +'make it your own'. 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, if err != nil { reqlog(ctx, "Failed to stat: %s", err) makeRespError(ctx, w, "Internal server error", http.StatusInternalServerError) + return } if stat.Size != claims.Gitolfs3.Size { reqlog(ctx, "Claims size does not match S3 object size") makeRespError(ctx, w, "Internal server error", http.StatusInternalServerError) + return } w.Header().Set("Content-Length", strconv.FormatInt(claims.Gitolfs3.Size, 10)) -- cgit v1.2.3