summaryrefslogtreecommitdiff
path: root/workhorse/internal/api
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-14 08:12:27 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-14 08:12:27 +0000
commit3772445de3063dda5e5fb2f21b6debf14032cc92 (patch)
tree8db2e49b644638f160392062221e6a0a56fcfd62 /workhorse/internal/api
parent28a9333b4b418ce3f96fcd0a530d76ac86e6c4ed (diff)
downloadgitlab-ce-3772445de3063dda5e5fb2f21b6debf14032cc92.tar.gz
Add latest changes from gitlab-org/gitlab@13-11-stable-ee
Diffstat (limited to 'workhorse/internal/api')
-rw-r--r--workhorse/internal/api/api.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/workhorse/internal/api/api.go b/workhorse/internal/api/api.go
index 445ca3a94cf..8ab83a1d986 100644
--- a/workhorse/internal/api/api.go
+++ b/workhorse/internal/api/api.go
@@ -168,7 +168,10 @@ func singleJoiningSlash(a, b string) string {
// joinURLPath is taken from reverseproxy.go:joinURLPath
func joinURLPath(a *url.URL, b string) (path string, rawpath string) {
- if a.RawPath == "" && b == "" {
+ // Avoid adding a trailing slash if the suffix is empty
+ if b == "" {
+ return a.Path, a.RawPath
+ } else if a.RawPath == "" {
return singleJoiningSlash(a.Path, b), ""
}