[ruby-cvs:70074] normal:r62963 (trunk): webrick/httprequest: use InputBufferSize for chunked requests

normal at ruby-lang.org normal at ruby-lang.org
Wed Mar 28 17:06:39 JST 2018


normal	2018-03-28 17:06:39 +0900 (Wed, 28 Mar 2018)

  New Revision: 62963

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

  Log:
    webrick/httprequest: use InputBufferSize for chunked requests
    
    While WEBrick::HTTPRequest#body provides a Proc interface
    for streaming large request bodies, clients must not force
    the server to use an excessively large chunk size.
    
    * lib/webrick/httprequest.rb (read_chunk_size): limit each
      read and block.call to :InputBufferSize in config.
    * test/webrick/test_httpserver.rb (test_big_chunks): new test

  Modified files:
    trunk/lib/webrick/httprequest.rb
    trunk/test/webrick/test_httpserver.rb


More information about the ruby-cvs mailing list