From 491e0fdf480157c6b7b4f683bbc17331857d909c Mon Sep 17 00:00:00 2001 From: Rupak Ganguly Date: Mon, 5 Aug 2013 15:55:02 -0400 Subject: [PATCH] [hp] Fix a small issue with the simple instrumentor. Remove igonore_aweful_caching from compute provider. --- lib/fog/hp/compute.rb | 3 +-- lib/fog/hp/simple_http_instrumentor.rb | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/fog/hp/compute.rb b/lib/fog/hp/compute.rb index 49ebdcabc..9e924d6de 100644 --- a/lib/fog/hp/compute.rb +++ b/lib/fog/hp/compute.rb @@ -237,8 +237,7 @@ module Fog 'X-Auth-Token' => @auth_token }.merge!(params[:headers] || {}), :host => @host, - :path => "#{@path}/#{params[:path]}", - :query => ('ignore_awful_caching' << Time.now.to_i.to_s) + :path => "#{@path}/#{params[:path]}" }), &block) rescue Excon::Errors::HTTPStatusError => error raise case error diff --git a/lib/fog/hp/simple_http_instrumentor.rb b/lib/fog/hp/simple_http_instrumentor.rb index ebc9b1a07..4306267f1 100644 --- a/lib/fog/hp/simple_http_instrumentor.rb +++ b/lib/fog/hp/simple_http_instrumentor.rb @@ -16,11 +16,13 @@ module Excon if name.include?('.request') query = '' if params.has_key?(:query) && !params[:query].nil? - query = '?' if params[:query].count > 0 params[:query].each do |key, value| query += "#{key}=#{value}&" end - query.chomp!('&') + if !tmp_query.nil? + query = "?#{tmp_query}" + query.chomp!('&') + end end $stderr.puts("#{params[:method]} #{params[:path]}#{query} HTTP/1.1" ) $stderr.puts("User-Agent: #{params[:headers]['User-Agent']}")