summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2016-12-21 11:54:22 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2016-12-21 11:54:22 +0000
commit0ad0aa42eb9c1b51a406173438b686458d9dc87e (patch)
treeb77de0e29aeea4b393108e14c74b05ce7638c6a0 /lib
parent8798b1829a2249d6ef68c4121089790a82a1ec64 (diff)
parent359718603eb880bffc5688c16ceed170823b665a (diff)
downloadgitlab-ce-0ad0aa42eb9c1b51a406173438b686458d9dc87e.tar.gz
Merge branch '25895-fix-headers-in-ci-api-helpers' into 'master'
Ensure nil User-Agent doesn't break the CI API Closes #25895 See merge request !8213
Diffstat (limited to 'lib')
-rw-r--r--lib/ci/api/helpers.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ci/api/helpers.rb b/lib/ci/api/helpers.rb
index 31fbd1da108..5ff25a3a9b2 100644
--- a/lib/ci/api/helpers.rb
+++ b/lib/ci/api/helpers.rb
@@ -60,7 +60,7 @@ module Ci
end
def build_not_found!
- if headers['User-Agent'].match(/gitlab-ci-multi-runner \d+\.\d+\.\d+(~beta\.\d+\.g[0-9a-f]+)? /)
+ if headers['User-Agent'].to_s.match(/gitlab-ci-multi-runner \d+\.\d+\.\d+(~beta\.\d+\.g[0-9a-f]+)? /)
no_content!
else
not_found!