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:
parent
b33cb3c017
commit
cba0d62d91
3 changed files with 7 additions and 0 deletions
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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]]
|
||||
|
|
Loading…
Add table
Reference in a new issue