summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2024-11-25 17:00:44 +0900
committergit <svn-admin@ruby-lang.org>2024-11-25 10:13:32 +0000
commit6ab76a6212853f8d43aa2505be3d198e574988ae (patch)
tree3a90170d744cf73489b0bcf87e9692873d065bab
parent4d8c793bc31e2adae2120861178d176ec64be408 (diff)
[rubygems/rubygems] Prevent a warning: net/http: Content-Type did not set
`make test-all RUBYOPT=-w` in the ruby/ruby repo printed the warning. This change prevents the warning by specifying the content-type explicitly. A follow-up to https://github.com/rubygems/rubygems/commit/b70c1bb1503d https://github.com/rubygems/rubygems/commit/d573af07f6
-rw-r--r--test/rubygems/utilities.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/rubygems/utilities.rb b/test/rubygems/utilities.rb
index 000cbe038d..bf601f6fac 100644
--- a/test/rubygems/utilities.rb
+++ b/test/rubygems/utilities.rb
@@ -115,6 +115,7 @@ class Gem::FakeFetcher
# Ensure multipart request bodies are generated
socket = FakeSocket.new
+ last_request.content_type ||= "application/x-www-form-urlencoded"
last_request.exec socket.binmode, "1.1", last_request.path
_, last_request.body = socket.string.split("\r\n\r\n", 2)