mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
4aa9e1ace0
commit
2dfc9e1626
3 changed files with 21 additions and 4 deletions
|
@ -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 /
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue