From 2339da8290061d975e06fc618b84999f260f458c Mon Sep 17 00:00:00 2001 From: Krzysztof Wilczynski Date: Fri, 28 Nov 2014 12:16:51 +0000 Subject: Fix. Make sure that scheme part of the URI is treated in a case-insensitive manner. This is as per http://en.wikipedia.org/wiki/URI_scheme, and solves some edges i.e., following (30x) URL from the "Location" header where we have to deal with "HTTP://". Signed-off-by: Krzysztof Wilczynski --- lib/chef/http.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/chef/http.rb') diff --git a/lib/chef/http.rb b/lib/chef/http.rb index 8d00a38dc1..5e52337aff 100644 --- a/lib/chef/http.rb +++ b/lib/chef/http.rb @@ -203,7 +203,7 @@ class Chef def create_url(path) return path if path.is_a?(URI) - if path =~ /^(http|https):\/\// + if path =~ /^(http|https):\/\//i URI.parse(path) elsif path.nil? or path.empty? URI.parse(@url) -- cgit v1.2.1