Merge remote-tracking branch 'origin/master' into 6.0.x

This commit is contained in:
William Cheng
2021-10-06 12:00:02 +08:00
1650 changed files with 36995 additions and 6074 deletions

View File

@@ -334,8 +334,8 @@ module DynamicServers
# @param [Array] content_types array for Content-Type
# @return [String] the Content-Type header (e.g. application/json)
def select_header_content_type(content_types)
# use application/json by default
return 'application/json' if content_types.nil? || content_types.empty?
# return nil by default
return if content_types.nil? || content_types.empty?
# use JSON when present, otherwise use the first one
json_content_type = content_types.find { |s| json_mime?(s) }
json_content_type || content_types.first

View File

@@ -147,13 +147,13 @@ module DynamicServers
@server_operation_variables = {}
@api_key = {}
@api_key_prefix = {}
@timeout = 0
@client_side_validation = true
@verify_ssl = true
@verify_ssl_host = true
@params_encoding = nil
@cert_file = nil
@key_file = nil
@timeout = 0
@debugging = false
@inject_format = false
@force_ending_format = false
@@ -350,5 +350,6 @@ module DynamicServers
url
end
end
end