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-13 15:10:02 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-13 15:10:02 +0300
commit3748ae5cbbefd3de0111951e71e74b676c276d61 (patch)
treeec12be349757c64eafaafdacd0eb7699adff113b /workhorse/internal/api/api.go
parent19325d74c2a5e7f367c6d1d6a064650f90a5b3e7 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'workhorse/internal/api/api.go')
-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 c83523c882a..d8e2a7b0d9f 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), ""
}