aboutsummaryrefslogtreecommitdiffstats
path: root/test/webrick
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-28 08:05:52 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-28 08:05:52 +0000
commit2bdcd0bddea7de08b8845918ed27185fa3125734 (patch)
tree25b0ac66e5bf5f25402f1a71fec61248afd65b70 /test/webrick
parentc44978b99f0454b8f00674f2f407893c8c47248e (diff)
downloadruby-2bdcd0bddea7de08b8845918ed27185fa3125734.tar.gz
webrick/httpresponse: IO.copy_stream for regular files
Remove the redundant _send_file method since its functionality is unnecessary with IO.copy_stream. IO.copy_stream also allows the use of sendfile under some OSes to speed up copies to non-TLS sockets. Testing with "curl >/dev/null" and "ruby -run -e httpd" to read a 1G file over Linux loopback reveals a reduction from around ~0.770 to ~0.490 seconds on the client side. * lib/webrick/httpresponse.rb (send_body_io): use IO.copy_stream (_send_file): remove [Feature #14237] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/webrick')
0 files changed, 0 insertions, 0 deletions