summaryrefslogtreecommitdiff
path: root/lib/chef/cookbook_uploader.rb
diff options
context:
space:
mode:
authordanielsdeleo <dan@opscode.com>2013-11-15 12:17:42 -0800
committerdanielsdeleo <dan@opscode.com>2013-11-15 12:17:42 -0800
commit5d2e306bfd4030a5c27bd8a0b13da686db3a6b8a (patch)
treeb7fae4b6b79c1959ededae8501dd68df995ae91e /lib/chef/cookbook_uploader.rb
parentecbc917ac5496f3138b798332ea66f477c33f8ba (diff)
downloadchef-5d2e306bfd4030a5c27bd8a0b13da686db3a6b8a.tar.gz
Backport URI::Generic#hostname to Ruby 1.9.2 and older
Documentation for URI::Generic#host in Ruby 2.0.0 explains: Since IPv6 addresses are wrapped by brackets in URIs, this method returns IPv6 addresses wrapped by brackets. This form is not appropriate to pass socket methods such as TCPSocket.open. If unwrapped host names are required, use “hostname” method. Therefore the best way to support IPv6 URIs is to replace calls to URI::Generic#host with URI::Generic#hostname. The #hostname method is added in Ruby 1.9.3 so we need to backport it for older ruby versions.
Diffstat (limited to 'lib/chef/cookbook_uploader.rb')
0 files changed, 0 insertions, 0 deletions