diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-10 15:09:45 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-10 15:09:45 +0300 |
commit | ec0ecba05cf7712bc8095af9363ee8ff8d999654 (patch) | |
tree | 703b6290381599c58b502e2b94b2d273cfcb00fe /lib/peek | |
parent | b6e10aaed70a798a57a40987b3aafcbb5b2a1f78 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/peek')
-rw-r--r-- | lib/peek/views/external_http.rb | 8 |
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 |