From f2d0abbdcac471267ebde1a5fc75bf1fb63fcba3 Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Tue, 14 Feb 2017 11:48:53 +0200 Subject: don't use http auth when no user or pw is in cfg fixes #720 --- lib/oxidized/source/http.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/oxidized') 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 -- cgit v1.2.1