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

* lib/webrick/httpservlet/filehandler.rb (make_partial_content):

add bytes-unit.  [ruby-dev:40030]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-01-18 08:16:07 +00:00
parent 9c54d38d60
commit f00951bb25
3 changed files with 73 additions and 2 deletions

View file

@ -87,7 +87,7 @@ module WEBrick
content = io.read(last-first+1)
body << "--" << boundary << CRLF
body << "Content-Type: #{mtype}" << CRLF
body << "Content-Range: #{first}-#{last}/#{filesize}" << CRLF
body << "Content-Range: bytes #{first}-#{last}/#{filesize}" << CRLF
body << CRLF
body << content
body << CRLF
@ -107,7 +107,7 @@ module WEBrick
content = io.read(last-first+1)
end
res['content-type'] = mtype
res['content-range'] = "#{first}-#{last}/#{filesize}"
res['content-range'] = "bytes #{first}-#{last}/#{filesize}"
res['content-length'] = last - first + 1
res.body = content
else