* lib/net/http.rb (Net::HTTPRequest#send_request_body_data):
set binmode to tempfile. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b33cb3c017
commit
cba0d62d91
@ -1,3 +1,8 @@
|
|||||||
|
Tue Dec 14 13:04:16 2010 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/net/http.rb (Net::HTTPRequest#send_request_body_data):
|
||||||
|
set binmode to tempfile.
|
||||||
|
|
||||||
Tue Dec 14 12:55:46 2010 NAKAMURA Usaku <usa@ruby-lang.org>
|
Tue Dec 14 12:55:46 2010 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
* test/zlib/test_zlib.rb (*): should close files associated with zlib.
|
* test/zlib/test_zlib.rb (*): should close files associated with zlib.
|
||||||
|
@ -1935,6 +1935,7 @@ module Net #:nodoc:
|
|||||||
else
|
else
|
||||||
require 'tempfile'
|
require 'tempfile'
|
||||||
file = Tempfile.new('multipart')
|
file = Tempfile.new('multipart')
|
||||||
|
file.binmode
|
||||||
encode_multipart_form_data(file, params, opt)
|
encode_multipart_form_data(file, params, opt)
|
||||||
file.rewind
|
file.rewind
|
||||||
self.content_length = file.size
|
self.content_length = file.size
|
||||||
|
@ -354,6 +354,7 @@ __EOM__
|
|||||||
def test_set_form_with_file
|
def test_set_form_with_file
|
||||||
require 'tempfile'
|
require 'tempfile'
|
||||||
file = Tempfile.new('ruby-test')
|
file = Tempfile.new('ruby-test')
|
||||||
|
file.binmode
|
||||||
file << $test_net_http_data
|
file << $test_net_http_data
|
||||||
filename = File.basename(file.to_path)
|
filename = File.basename(file.to_path)
|
||||||
data = [['file', file]]
|
data = [['file', file]]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user