@@ -260,7 +260,6 @@ def finish
260
260
def send_request_with_body ( sock , ver , path , body )
261
261
self . content_length = body . bytesize
262
262
delete 'Transfer-Encoding'
263
- supply_default_content_type
264
263
write_header sock , ver , path
265
264
wait_for_continue sock , ver if sock . continue_timeout
266
265
sock . write body
@@ -271,7 +270,6 @@ def send_request_with_body_stream(sock, ver, path, f)
271
270
raise ArgumentError ,
272
271
"Content-Length not given and Transfer-Encoding is not `chunked'"
273
272
end
274
- supply_default_content_type
275
273
write_header sock , ver , path
276
274
wait_for_continue sock , ver if sock . continue_timeout
277
275
if chunked?
@@ -373,12 +371,6 @@ def flush_buffer(out, buf, chunked_p)
373
371
buf . clear
374
372
end
375
373
376
- def supply_default_content_type
377
- return if content_type ( )
378
- warn 'net/http: Content-Type did not set; using application/x-www-form-urlencoded' , uplevel : 1 if $VERBOSE
379
- set_content_type 'application/x-www-form-urlencoded'
380
- end
381
-
382
374
##
383
375
# Waits up to the continue timeout for a response from the server provided
384
376
# we're speaking HTTP 1.1 and are expecting a 100-continue response.
@@ -411,4 +403,3 @@ def write_header(sock, ver, path)
411
403
end
412
404
413
405
end
414
-
0 commit comments