summaryrefslogtreecommitdiff
path: root/test/webrick
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-21 08:27:08 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-21 08:27:08 +0000
commit2dfc9e162615a326eb639bd51ce0ae9ec3d439e4 (patch)
treeb2bacd3f3715aa726d7c46404e5c803ddfc46c2f /test/webrick
parent4aa9e1ace0c240a99bd41b59a3df736948198480 (diff)
* lib/webrick/httprequest.rb (WEBrick::HTTPRequest#each):
Allow HTTP/0.9 request which doesn't has any header or body. patched by Felix Jodoin. [ruby-core:38040] [Bug #5022] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/webrick')
-rw-r--r--test/webrick/test_httprequest.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/webrick/test_httprequest.rb b/test/webrick/test_httprequest.rb
index d8467d4..0ce6b4f 100644
--- a/test/webrick/test_httprequest.rb
+++ b/test/webrick/test_httprequest.rb
@@ -3,6 +3,15 @@ require "stringio"
require "test/unit"
class TestWEBrickHTTPRequest < Test::Unit::TestCase
+ def test_simple_request
+ msg = <<-_end_of_message_
+GET /
+ _end_of_message_
+ req = WEBrick::HTTPRequest.new(WEBrick::Config::HTTP)
+ req.parse(StringIO.new(msg))
+ assert(req.meta_vars) # fails if @header was not initialized and iteration is attempted on the nil reference
+ end
+
def test_parse_09
msg = <<-_end_of_message_
GET /