mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Use binread because webrick also uses binread
Reported-by: MSP-Greg [Bug #15203] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5a9b23abb7
commit
0f5853c2c4
2 changed files with 3 additions and 3 deletions
|
@ -98,7 +98,7 @@ class WEBrick::TestFileHandler < Test::Unit::TestCase
|
|||
config = { :DocumentRoot => File.dirname(__FILE__), }
|
||||
this_file = File.basename(__FILE__)
|
||||
filesize = File.size(__FILE__)
|
||||
this_data = File.open(__FILE__, "rb") {|f| f.read}
|
||||
this_data = File.binread(__FILE__)
|
||||
range = nil
|
||||
bug2593 = '[ruby-dev:40030]'
|
||||
|
||||
|
@ -114,7 +114,7 @@ class WEBrick::TestFileHandler < Test::Unit::TestCase
|
|||
http.request(req){|res|
|
||||
assert_equal("200", res.code, log.call)
|
||||
assert_equal("text/plain", res.content_type, log.call)
|
||||
assert_equal(File.read(__FILE__), res.body, log.call)
|
||||
assert_equal(this_data, res.body, log.call)
|
||||
}
|
||||
|
||||
req = Net::HTTP::Get.new("/#{this_file}", "range"=>"bytes=#{filesize-100}-")
|
||||
|
|
|
@ -237,7 +237,7 @@ GET /
|
|||
|
||||
def test_chunked
|
||||
crlf = "\x0d\x0a"
|
||||
expect = File.read(__FILE__).freeze
|
||||
expect = File.binread(__FILE__).freeze
|
||||
msg = <<-_end_of_message_
|
||||
POST /path HTTP/1.1
|
||||
Host: test.ruby-lang.org:8080
|
||||
|
|
Loading…
Reference in a new issue