From 2e699d502a044cd2d18d6279669841413da234f8 Mon Sep 17 00:00:00 2001 From: Wesley Beary Date: Thu, 9 Jul 2009 23:07:16 -0700 Subject: [PATCH] remove legacy split for parser input and s3 basic parser --- lib/fog/aws/ec2.rb | 2 +- lib/fog/aws/s3.rb | 6 ++---- lib/fog/aws/simpledb.rb | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/fog/aws/ec2.rb b/lib/fog/aws/ec2.rb index 95303a70a..c8d30328c 100644 --- a/lib/fog/aws/ec2.rb +++ b/lib/fog/aws/ec2.rb @@ -391,7 +391,7 @@ module Fog }) if parser && !response.body.empty? - Nokogiri::XML::SAX::Parser.new(parser).parse(response.body.split(/<\?xml.*\?>/)[1]) + Nokogiri::XML::SAX::Parser.new(parser).parse(response.body) response.body = parser.response end diff --git a/lib/fog/aws/s3.rb b/lib/fog/aws/s3.rb index 2f35f301a..a6008f59f 100644 --- a/lib/fog/aws/s3.rb +++ b/lib/fog/aws/s3.rb @@ -73,8 +73,7 @@ DATA :body => data, :headers => {}, :host => "#{bucket_name}.#{@host}", - :method => 'PUT', - :parser => Fog::Parsers::AWS::S3::BasicParser.new + :method => 'PUT' }) end @@ -95,7 +94,6 @@ DATA :headers => {}, :host => "#{bucket_name}.#{@host}", :method => 'PUT', - :parser => Fog::Parsers::AWS::S3::BasicParser.new, :query => "requestPayment" }) end @@ -302,7 +300,7 @@ DATA }) if params[:parser] && !response.body.empty? - Nokogiri::XML::SAX::Parser.new(params[:parser]).parse(response.body.split(/<\?xml.*\?>/)[1]) + Nokogiri::XML::SAX::Parser.new(params[:parser]).parse(response.body) response.body = params[:parser].response end diff --git a/lib/fog/aws/simpledb.rb b/lib/fog/aws/simpledb.rb index ef80adac6..981f8a58c 100644 --- a/lib/fog/aws/simpledb.rb +++ b/lib/fog/aws/simpledb.rb @@ -333,7 +333,7 @@ module Fog }) if parser && !response.body.empty? - Nokogiri::XML::SAX::Parser.new(parser).parse(response.body.split(/<\?xml.*\?>/)[1]) + Nokogiri::XML::SAX::Parser.new(parser).parse(response.body) response.body = parser.response end