diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-12-13 11:36:09 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-12-13 11:36:09 +0000 |
commit | 47dc17bce2e59b403dffa9eacc8b146618dba2c2 (patch) | |
tree | 544fda407b7df029b0dd122f949fd0dfe3ad9694 /lib/httpunix.rb | |
parent | df89099ed954a6673bb8388ef74480940d40a759 (diff) | |
download | gitlab-shell-47dc17bce2e59b403dffa9eacc8b146618dba2c2.tar.gz |
Revert "Merge branch 'sh-bump-ruby-version' into 'master'"
This reverts merge request !257
Diffstat (limited to 'lib/httpunix.rb')
-rw-r--r-- | lib/httpunix.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/httpunix.rb b/lib/httpunix.rb index 230db46..7d00f71 100644 --- a/lib/httpunix.rb +++ b/lib/httpunix.rb @@ -12,14 +12,13 @@ module URI def hostname # decode %XX from path to file v = host - URI.decode(v) # rubocop:disable Lint/UriEscapeUnescape + URI.decode(v) end # port is not allowed in URI DEFAULT_PORT = nil - def set_port(value) - return value unless value - + def set_port(v) + return v unless v raise InvalidURIError, "http+unix:// cannot contain port" end end |