diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-03 23:42:26 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-03 23:42:26 +0000 |
commit | 57c1406697134de5e6fe11f19d478472b6ac5323 () | |
tree | 95569e91d6c1b3fa273e41688557fd5604d634f7 /test/net/http/utils.rb | |
parent | e6ccffd96619ab4c7926eaa96fbc8166024201d4 (diff) |
* lib/net/http.rb (Net::HTTPResponse#read_chunked): ensure to skip the
last newline of chunk. [ruby-core:29229] * test/net/http/utils.rb: add an option for chunked response test. * test/net/http/test_http.rb: add tests for chunked response. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | test/net/http/utils.rb | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -48,6 +48,7 @@ module TestNetHTTPUtils :ShutdownSocketWithoutClose => true, :ServerType => Thread, } if defined?(OpenSSL) and config('ssl_enable') server_config.update({ :SSLEnable => true, @@ -56,7 +57,7 @@ module TestNetHTTPUtils }) end @server = WEBrick::HTTPServer.new(server_config) - @server.mount('/', Servlet) @server.start n_try_max = 5 begin @@ -75,15 +76,21 @@ module TestNetHTTPUtils $test_net_http_data_type = 'application/octet-stream' class Servlet < WEBrick::HTTPServlet::AbstractServlet def do_GET(req, res) res['Content-Type'] = $test_net_http_data_type res.body = $test_net_http_data end # echo server def do_POST(req, res) res['Content-Type'] = req['Content-Type'] res.body = req.body end end |