summaryrefslogtreecommitdiff
path: root/app/models/project_services
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-01-26 16:06:01 -0800
committerStan Hu <stanhu@gmail.com>2018-01-29 16:49:43 -0800
commit8f965d0fa39b5800b0bb135791a6817a41007d56 (patch)
tree4eebf2b20547df741d90b7a7156df38d21727a9e /app/models/project_services
parent1f309b69df3f71d988d4d31b08a1b683099a46e5 (diff)
downloadgitlab-ce-8f965d0fa39b5800b0bb135791a6817a41007d56.tar.gz
Fix JIRA not working when a trailing slash is included
Leaving a trailing slash in the context option causes the jira-ruby gem to add an extra slash in HTTP requests to the URL, preventing JIRA from working properly. Closes #42494
Diffstat (limited to 'app/models/project_services')
-rw-r--r--app/models/project_services/jira_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/project_services/jira_service.rb b/app/models/project_services/jira_service.rb
index 2be35b6ea9d..23147d7f666 100644
--- a/app/models/project_services/jira_service.rb
+++ b/app/models/project_services/jira_service.rb
@@ -43,7 +43,7 @@ class JiraService < IssueTrackerService
username: self.username,
password: self.password,
site: URI.join(url, '/').to_s,
- context_path: url.path,
+ context_path: url.path.chomp('/'),
auth_type: :basic,
read_timeout: 120,
use_cookies: true,