зеркало из https://github.com/github/ruby.git
[rubygems/rubygems] Suppress Content-Type warnings
https://github.com/rubygems/rubygems/commit/97dbe4cabd
This commit is contained in:
Родитель
512cac3240
Коммит
11ee4f2b71
|
@ -214,8 +214,9 @@ class Gem::MockBrowser
|
|||
end
|
||||
end
|
||||
|
||||
def self.post(uri)
|
||||
post = Net::HTTP::Post.new(uri)
|
||||
def self.post(uri, content_type: "application/x-www-form-urlencoded")
|
||||
headers = { "content-type" => content_type } if content_type
|
||||
post = Net::HTTP::Post.new(uri, headers)
|
||||
Net::HTTP.start(uri.hostname, uri.port) do |http|
|
||||
http.request(post)
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче