Skip to content

Commit

Permalink
modified the "Content-Range" header. Merged from CRuby 1.9 r26346.
Browse files Browse the repository at this point in the history
see ruby/ruby@f00951b

git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@5005 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information
Watson1978 committed Dec 9, 2010
1 parent a3a259b commit c8ea52d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/webrick/httpservlet/filehandler.rb
Expand Up @@ -87,7 +87,7 @@ def make_partial_content(req, res, filename, filesize)
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
Expand All @@ -107,7 +107,7 @@ def make_partial_content(req, res, filename, filesize)
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
Expand Down

0 comments on commit c8ea52d

Please sign in to comment.