[ruby-cvs:70071] normal:r62955 (trunk): webrick: use IO.copy_stream for single range response

normal at ruby-lang.org normal at ruby-lang.org
Wed Mar 28 17:05:57 JST 2018


normal	2018-03-28 17:05:57 +0900 (Wed, 28 Mar 2018)

  New Revision: 62955

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62955

  Log:
    webrick: use IO.copy_stream for single range response
    
    This is also compatible with range responses generated
    by Rack::File (tested with rack 2.0.3).
    
    * lib/webrick/httpresponse.rb (send_body_io): use Content-Range
    * lib/webrick/httpservlet/filehandler.rb (make_partial_content):
      use File object for the single range case
    * test/webrick/test_filehandler.rb (get_res_body): use send_body
      to test result

  Modified files:
    trunk/lib/webrick/httpresponse.rb
    trunk/lib/webrick/httpservlet/filehandler.rb
    trunk/test/webrick/test_filehandler.rb


More information about the ruby-cvs mailing list