From 554c879f1f0138a3981b9245b397a1a969461c7b Mon Sep 17 00:00:00 2001 From: shugo Date: Wed, 6 Jul 2016 00:01:20 +0000 Subject: * lib/net/http/generic_rquest.rb (write_header): A Request-Line must not contain CR or LF. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/net/http/test_http.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test') diff --git a/test/net/http/test_http.rb b/test/net/http/test_http.rb index 493823549a..697296629c 100644 --- a/test/net/http/test_http.rb +++ b/test/net/http/test_http.rb @@ -315,6 +315,14 @@ module TestNetHTTP_version_1_1_methods assert_equal $test_net_http_data, res.body end + def test_get__crlf + start {|http| + assert_raise(ArgumentError) do + http.get("\r") + end + } + end + def test_get2 start {|http| http.get2('/') {|res| -- cgit v1.2.3