From a7f1b52128feca752b1a3a417a3cb703aeb92f2e Mon Sep 17 00:00:00 2001 From: Troy Howard Date: Fri, 19 Oct 2012 00:31:51 -0700 Subject: [PATCH] downcase metadata keys in xml for consistency --- lib/azure/storage/service/serialization.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/azure/storage/service/serialization.rb b/lib/azure/storage/service/serialization.rb index bc7c5d725..ab369f3b4 100644 --- a/lib/azure/storage/service/serialization.rb +++ b/lib/azure/storage/service/serialization.rb @@ -109,11 +109,13 @@ module Azure metadata = {} xml.children.each { |meta_node| - if metadata.has_key? meta_node.name - metadata[meta_node.name] = [metadata[meta_node.name]] unless metadata[meta_node.name].respond_to? :push - metadata[meta_node.name].push(meta_node.text) + + key = meta_node.name.downcase + if metadata.has_key? key + metadata[key] = [metadata[key]] unless metadata[key].respond_to? :push + metadata[key].push(meta_node.text) else - metadata[meta_node.name] = meta_node.text + metadata[key] = meta_node.text end } metadata