diff options
author | Krzysztof Wilczynski <krzysztof.wilczynski@linux.com> | 2014-11-28 12:16:51 +0000 |
---|---|---|
committer | Krzysztof Wilczynski <krzysztof.wilczynski@linux.com> | 2014-11-28 13:16:50 +0000 |
commit | 31576ab0ec01c698fa2bd8c6ebcccd6468d0bcff (patch) | |
tree | 50ef025b548b812b896117a62deb49573937911d /lib/chef/http.rb | |
parent | 3ad740754507629a73525ffdcc0b3eb06f177001 (diff) | |
download | chef-kwilczynski/http-create-url.tar.gz |
Fix. Make sure that scheme part of the URI is treated in a case-insensitive manner.kwilczynski/http-create-url
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 <krzysztof.wilczynski@linux.com>
Diffstat (limited to 'lib/chef/http.rb')
-rw-r--r-- | lib/chef/http.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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) |