diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
commit | 859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 (patch) | |
tree | d7f2700abe6b4ffcb2dcfc80631b2d87d0609239 /workhorse/main_test.go | |
parent | 446d496a6d000c73a304be52587cd9bbc7493136 (diff) |
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42
Diffstat (limited to 'workhorse/main_test.go')
-rw-r--r-- | workhorse/main_test.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/workhorse/main_test.go b/workhorse/main_test.go index d15af1d3e4c..b725f36a68a 100644 --- a/workhorse/main_test.go +++ b/workhorse/main_test.go @@ -694,6 +694,12 @@ func testAuthServer(t *testing.T, url *regexp.Regexp, params url.Values, code in return testhelper.TestServerWithHandler(url, func(w http.ResponseWriter, r *http.Request) { require.NotEmpty(t, r.Header.Get("X-Request-Id")) + // return a 204 No Content response if we don't receive the JWT header + if r.Header.Get(secret.RequestHeader) == "" { + w.WriteHeader(204) + return + } + w.Header().Set("Content-Type", api.ResponseContentType) logEntry := log.WithFields(log.Fields{ |