diff options
author | Saku Ytti <saku@ytti.fi> | 2017-02-14 11:48:53 +0200 |
---|---|---|
committer | Saku Ytti <saku@ytti.fi> | 2017-02-14 11:48:53 +0200 |
commit | f2d0abbdcac471267ebde1a5fc75bf1fb63fcba3 (patch) | |
tree | a1b17109d0a641ef863bb5e8349093bb5b7e0713 /lib | |
parent | aecb09e89206a7b492cea678f63f09041a757aa5 (diff) |
don't use http auth when no user or pw is in cfg
fixes #720
Diffstat (limited to 'lib')
-rw-r--r-- | lib/oxidized/source/http.rb | 2 |
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 |