Don't normalize unicode in templates (fixed #557 + GCS issues)
This commit is contained in:
1 parent
c4d0ed5d3c
commit
5447ddb7c0
6 files changed
+36
-6
No files matched your search
@@ -139,8 +139,12 @@ module Google
|
||||
# @private
|
||||
# @return [void]
|
||||
def prepare!
|
||||
header.update(options.header) if options && options.header
|
||||
self.url = url.expand(params) if url.is_a?(Addressable::Template)
|
||||
normalize_unicode = true
|
||||
if options
|
||||
header.update(options.header) if options.header
|
||||
normalize_unicode = options.normalize_unicode
|
||||
end
|
||||
self.url = url.expand(params, nil, normalize_unicode) if url.is_a?(Addressable::Template)
|
||||
url.query_values = query.merge(url.query_values || {})
|
||||
|
||||
if allow_form_encoding?
|
||||
|
||||
@@ -26,7 +26,8 @@ module Google
|
||||
:retries,
|
||||
:header,
|
||||
:timeout_sec,
|
||||
:open_timeout_sec)
|
||||
:open_timeout_sec,
|
||||
:normalize_unicode)
|
||||
|
||||
# General client options
|
||||
class ClientOptions
|
||||
@@ -56,6 +57,8 @@ module Google
|
||||
# @return [Fixnum] How long, in seconds, before failed connections time out
|
||||
# @!attribute [rw] header
|
||||
# @return [Hash<String,String] Additional HTTP headers to include in requests
|
||||
# @!attribute [rw] normalize_unicode
|
||||
# @return [Boolean] True if unicode strings should be normalized in path parameters
|
||||
|
||||
# Get the default options
|
||||
# @return [Google::Apis::RequestOptions]
|
||||
@@ -78,8 +81,8 @@ module Google
|
||||
ClientOptions.default.use_net_http = false
|
||||
ClientOptions.default.application_name = 'unknown'
|
||||
ClientOptions.default.application_version = '0.0.0'
|
||||
|
||||
RequestOptions.default.retries = 0
|
||||
RequestOptions.default.open_timeout_sec = 20
|
||||
RequestOptions.default.normalize_unicode = false
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user