lib/tencent_cloud/common/http/sign.rb in tencentcloud-sdk-ruby-0.3.2 vs lib/tencent_cloud/common/http/sign.rb in tencentcloud-sdk-ruby-0.3.3
- old
+ new
@@ -1,10 +1,11 @@
# frozen_string_literal: true
require 'openssl'
require 'typhoeus'
require 'uri'
+require 'cgi'
require 'json'
module TencentCloud
module Common
module Http
class Sign
@@ -76,10 +77,10 @@
(request.options[:method] || 'get').upcase
end
def canonical_uri
uri = URI(request.base_url)
- url_path = URI.encode(uri.path)
+ url_path = CGI.escape(uri.path)
url_path == '' ? '/' : url_path
end
def canonical_headers
headers_to_sign = []