Skip to content

Commit

Permalink
Allow matching urls w/ default port and path
Browse files Browse the repository at this point in the history
  • Loading branch information
henrahmagix committed Jun 1, 2022
1 parent 33d8810 commit 1596148
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/webmock/webmock.rb
Expand Up @@ -82,7 +82,7 @@ def self.net_connect_explicit_allowed?(allowed, uri=nil)
allowed == uri.host ||
allowed == "#{uri.host}:#{uri.port}" ||
allowed == "#{uri.scheme}://#{uri.host}:#{uri.port}" ||
allowed == "#{uri.scheme}://#{uri.host}" && uri.port == uri.default_port
(allowed == uri.omit(:port).to_s && uri.port == uri.default_port)
else
if allowed.respond_to?(:call)
allowed.call(uri)
Expand Down

0 comments on commit 1596148

Please sign in to comment.