From f75aff0139347afb89fcb931f6cc78703bb5c36a Mon Sep 17 00:00:00 2001 From: gotoyuzo Date: Thu, 18 Dec 2003 19:08:11 +0000 Subject: [PATCH] * lib/webrick/httputils.rb (parse_form_data): should return an empty Hash if the body is empty. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ lib/webrick/httputils.rb | 1 + 2 files changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index ebe90eff63..43bca9aa8c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Dec 19 03:44:27 2003 GOTOU Yuuzou + + * lib/webrick/httputils.rb (parse_form_data): should return an + empty Hash if the body is empty. + Thu Dec 18 21:47:35 2003 NAKAMURA Usaku * lib/mkmf.rb (create_makefile): should remove deffile if it's diff --git a/lib/webrick/httputils.rb b/lib/webrick/httputils.rb index 6b8704cc7f..78780c4976 100644 --- a/lib/webrick/httputils.rb +++ b/lib/webrick/httputils.rb @@ -296,6 +296,7 @@ module WEBrick def parse_form_data(io, boundary) boundary_regexp = /\A--#{boundary}(--)?#{CRLF}\z/ form_data = Hash.new + return form_data unless io data = nil io.each{|line| if boundary_regexp =~ line