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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-14 11:12:27 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-14 11:12:27 +0300
commit3772445de3063dda5e5fb2f21b6debf14032cc92 (patch)
tree8db2e49b644638f160392062221e6a0a56fcfd62 /workhorse/main_test.go
parent28a9333b4b418ce3f96fcd0a530d76ac86e6c4ed (diff)
Add latest changes from gitlab-org/gitlab@13-11-stable-ee
Diffstat (limited to 'workhorse/main_test.go')
-rw-r--r--workhorse/main_test.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/workhorse/main_test.go b/workhorse/main_test.go
index 4e169b5112f..5729d2412bc 100644
--- a/workhorse/main_test.go
+++ b/workhorse/main_test.go
@@ -536,7 +536,11 @@ func TestApiContentTypeBlock(t *testing.T) {
func TestAPIFalsePositivesAreProxied(t *testing.T) {
goodResponse := []byte(`<html></html>`)
ts := testhelper.TestServerWithHandler(regexp.MustCompile(`.`), func(w http.ResponseWriter, r *http.Request) {
- if r.Header.Get(secret.RequestHeader) != "" && r.Method != "GET" {
+ url := r.URL.String()
+ if url[len(url)-1] == '/' {
+ w.WriteHeader(500)
+ w.Write([]byte("PreAuthorize request included a trailing slash"))
+ } else if r.Header.Get(secret.RequestHeader) != "" && r.Method != "GET" {
w.WriteHeader(500)
w.Write([]byte("non-GET request went through PreAuthorize handler"))
} else {