summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-18 08:16:07 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-18 08:16:07 +0000
commit040fef9a89b8da5cdc2e263eb5d94806a8058b83 (patch)
treec8ddaebbeca4b2522ce4f704e900eb979f663981 /lib
parent08e5438ac932a5bf8eb47b7599ac4edcb3cfd7d3 (diff)
* lib/webrick/httpservlet/filehandler.rb (make_partial_content):
add bytes-unit. [ruby-dev:40030] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@26346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/webrick/httpservlet/filehandler.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/webrick/httpservlet/filehandler.rb b/lib/webrick/httpservlet/filehandler.rb
index 24f59d7142..6f6074d81f 100644
--- a/lib/webrick/httpservlet/filehandler.rb
+++ b/lib/webrick/httpservlet/filehandler.rb
@@ -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