From be944fb1af7a605cecadbe0b37e5f714bd9e74d0 Mon Sep 17 00:00:00 2001 From: jdrago999 Date: Tue, 12 Nov 2024 00:01:21 -0800 Subject: [PATCH 1/2] Update configuration.rb - remove URI.encode Use URI::DEFAULT_PARSER.escape(...) instead --- lib/swagger_client/configuration.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/swagger_client/configuration.rb b/lib/swagger_client/configuration.rb index 67a619d..300c245 100755 --- a/lib/swagger_client/configuration.rb +++ b/lib/swagger_client/configuration.rb @@ -180,7 +180,7 @@ def base_path=(base_path) def base_url url = "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') - URI.encode(url) + URI::DEFAULT_PARSER.escape(url) end # Gets API key (with prefix if set). From 75653cbc8a74b2423849122e5f09925c4e9986f2 Mon Sep 17 00:00:00 2001 From: jdrago999 Date: Tue, 12 Nov 2024 00:02:16 -0800 Subject: [PATCH 2/2] Update api_client.rb to not use URI.encode Use URI::DEFAULT_PARSER.escape(...) instead --- lib/swagger_client/api_client.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/swagger_client/api_client.rb b/lib/swagger_client/api_client.rb index cef69c5..87ab21d 100755 --- a/lib/swagger_client/api_client.rb +++ b/lib/swagger_client/api_client.rb @@ -262,7 +262,7 @@ def sanitize_filename(filename) def build_request_url(path) # Add leading and trailing slashes to path path = "/#{path}".gsub(/\/+/, '/') - URI.encode(@config.base_url + path) + URI::DEFAULT_PARSER.escape(@config.base_url + path) end # Builds the HTTP request body