[rubygems/rubygems] Suppress Content-Type warnings
https://github.com/rubygems/rubygems/commit/97dbe4cabd
This commit is contained in:
parent
512cac3240
commit
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user