diff options
Diffstat (limited to 'cmd/git-lfs-server')
-rw-r--r-- | cmd/git-lfs-server/main.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/git-lfs-server/main.go b/cmd/git-lfs-server/main.go index 2b75b3d..50675ae 100644 --- a/cmd/git-lfs-server/main.go +++ b/cmd/git-lfs-server/main.go | |||
@@ -208,7 +208,7 @@ func (h *handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { | |||
208 | reqPath = r.URL.Path | 208 | reqPath = r.URL.Path |
209 | } | 209 | } |
210 | log("reqPath: %s", reqPath) | 210 | log("reqPath: %s", reqPath) |
211 | reqPath = strings.TrimPrefix("/", path.Clean(reqPath)) | 211 | reqPath = strings.TrimPrefix(path.Clean(reqPath), "/") |
212 | log("Cleaned reqPath: %s", reqPath) | 212 | log("Cleaned reqPath: %s", reqPath) |
213 | submatches := re.FindStringSubmatch(reqPath) | 213 | submatches := re.FindStringSubmatch(reqPath) |
214 | if len(submatches) != 2 { | 214 | if len(submatches) != 2 { |
@@ -216,7 +216,7 @@ func (h *handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { | |||
216 | makeRespError(w, "Not found", http.StatusNotFound) | 216 | makeRespError(w, "Not found", http.StatusNotFound) |
217 | return | 217 | return |
218 | } | 218 | } |
219 | repo := strings.TrimPrefix("/", path.Clean(submatches[1])) | 219 | repo := strings.TrimPrefix(path.Clean(submatches[1]), "/") |
220 | log("Repository: %s", repo) | 220 | log("Repository: %s", repo) |
221 | 221 | ||
222 | if !slices.ContainsFunc(r.Header.Values("Accept"), isLFSMediaType) { | 222 | if !slices.ContainsFunc(r.Header.Values("Accept"), isLFSMediaType) { |