From 8934f73320480b26ff4909139539f4937105610b Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Mon, 10 Apr 2017 11:33:42 +0300 Subject: Remove username/password prior to testing URL with curb. --- lib/custodian/protocoltest/http.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/custodian/protocoltest/http.rb b/lib/custodian/protocoltest/http.rb index a4c4adb..dfd8ee4 100644 --- a/lib/custodian/protocoltest/http.rb +++ b/lib/custodian/protocoltest/http.rb @@ -108,7 +108,6 @@ module Custodian @username = u.user if ( u.user ) @password = u.password if ( u.password ) - # # Expected status # @@ -254,6 +253,17 @@ module Custodian end end + # + # If we're running with HTTP-basic-auth we should remove + # the username/password from the URL we're passing to curb. + # + if ( basic_auth? ) + u = URI.parse(test_url) + u.user = nil + u.password = nil + test_url = u.to_s + end + errors = [] resolution_errors = [] -- cgit v1.2.1