diff options
author | Steve Kemp <steve@steve.org.uk> | 2017-04-10 11:33:42 +0300 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2017-04-10 11:33:42 +0300 |
commit | 8934f73320480b26ff4909139539f4937105610b (patch) | |
tree | 5970d262854c643a30fd2f5e2539f4176b507006 | |
parent | 5703a7727fe69c492296f126ce28b06b7a6a11a0 (diff) |
Remove username/password prior to testing URL with curb.
-rw-r--r-- | lib/custodian/protocoltest/http.rb | 12 |
1 files changed, 11 insertions, 1 deletions
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 = [] |