1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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:
naruse 2010-12-14 04:05:03 +00:00
parent b33cb3c017
commit cba0d62d91
3 changed files with 7 additions and 0 deletions

View file

@ -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>
* test/zlib/test_zlib.rb (*): should close files associated with zlib.

View file

@ -1935,6 +1935,7 @@ module Net #:nodoc:
else
require 'tempfile'
file = Tempfile.new('multipart')
file.binmode
encode_multipart_form_data(file, params, opt)
file.rewind
self.content_length = file.size

View file

@ -354,6 +354,7 @@ __EOM__
def test_set_form_with_file
require 'tempfile'
file = Tempfile.new('ruby-test')
file.binmode
file << $test_net_http_data
filename = File.basename(file.to_path)
data = [['file', file]]