Skip to content

Commit 6ab76a6

Browse files
mamematzbot
authored andcommitted
[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 ruby/rubygems@b70c1bb1503d ruby/rubygems@d573af07f6
1 parent 4d8c793 commit 6ab76a6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/rubygems/utilities.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ def request(uri, request_class, last_modified = nil)
115115

116116
# Ensure multipart request bodies are generated
117117
socket = FakeSocket.new
118+
last_request.content_type ||= "application/x-www-form-urlencoded"
118119
last_request.exec socket.binmode, "1.1", last_request.path
119120
_, last_request.body = socket.string.split("\r\n\r\n", 2)
120121

0 commit comments

Comments
 (0)