summaryrefslogtreecommitdiff
path: root/lib/oxidized/source/http.rb
diff options
context:
space:
mode:
authorSaku Ytti <saku@ytti.fi>2017-02-14 11:48:53 +0200
committerSaku Ytti <saku@ytti.fi>2017-02-14 11:48:53 +0200
commitf2d0abbdcac471267ebde1a5fc75bf1fb63fcba3 (patch)
treea1b17109d0a641ef863bb5e8349093bb5b7e0713 /lib/oxidized/source/http.rb
parentaecb09e89206a7b492cea678f63f09041a757aa5 (diff)
don't use http auth when no user or pw is in cfg
fixes #720
Diffstat (limited to 'lib/oxidized/source/http.rb')
-rw-r--r--lib/oxidized/source/http.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/oxidized/source/http.rb b/lib/oxidized/source/http.rb
index 7186f98..6c12f29 100644
--- a/lib/oxidized/source/http.rb
+++ b/lib/oxidized/source/http.rb
@@ -29,7 +29,7 @@ class HTTP < Source
end
request = Net::HTTP::Get.new(uri.request_uri, headers)
- if (@cfg.user && @cfg.pass)
+ if (@cfg.user? && @cfg.pass?)
request.basic_auth(@cfg.user,@cfg.pass)
end