Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'workhorse/internal/git/info-refs.go')
-rw-r--r--workhorse/internal/git/info-refs.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/workhorse/internal/git/info-refs.go b/workhorse/internal/git/info-refs.go
index e5491a7b733..6d0826a22f9 100644
--- a/workhorse/internal/git/info-refs.go
+++ b/workhorse/internal/git/info-refs.go
@@ -20,6 +20,11 @@ func GetInfoRefsHandler(a *api.API) http.Handler {
return repoPreAuthorizeHandler(a, handleGetInfoRefs)
}
+func IsSmartInfoRefs(r *http.Request) bool {
+ service := r.URL.Query().Get("service")
+ return r.Method == "GET" && (service == "git-upload-pack" || service == "git-receive-pack")
+}
+
func handleGetInfoRefs(rw http.ResponseWriter, r *http.Request, a *api.Response) {
responseWriter := NewHttpResponseWriter(rw)
// Log 0 bytes in because we ignore the request body (and there usually is none anyway).