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
path: root/lib/peek
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-02-10 15:09:45 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-02-10 15:09:45 +0300
commitec0ecba05cf7712bc8095af9363ee8ff8d999654 (patch)
tree703b6290381599c58b502e2b94b2d273cfcb00fe /lib/peek
parentb6e10aaed70a798a57a40987b3aafcbb5b2a1f78 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/peek')
-rw-r--r--lib/peek/views/external_http.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/peek/views/external_http.rb b/lib/peek/views/external_http.rb
index bd0e4c64127..b925e3db7b6 100644
--- a/lib/peek/views/external_http.rb
+++ b/lib/peek/views/external_http.rb
@@ -86,12 +86,16 @@ module Peek
uri.hostname = call[:host]
uri.port = call[:port]
uri.path = call[:path]
- uri.query = call[:query]
+ uri.query = generate_query(call[:query])
uri.to_s
- rescue URI::Error
+ rescue StandardError
'unknown'
end
+
+ def generate_query(query_string)
+ query_string.is_a?(Hash) ? query_string.to_query : query_string.to_s
+ end
end
end
end