summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-18 19:08:11 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-18 19:08:11 +0000
commite25ed2df10c1ea10e951f1a066a77076d15b9ec8 (patch)
tree2520f19869850654c735365871f96115b0e774cb
parent74d3bfb3283d295f5e0bcffb4aa0801affdc2989 (diff)
downloadruby-e25ed2df10c1ea10e951f1a066a77076d15b9ec8.tar.gz
ruby-e25ed2df10c1ea10e951f1a066a77076d15b9ec8.tar.xz
ruby-e25ed2df10c1ea10e951f1a066a77076d15b9ec8.zip
* lib/webrick/httputils.rb (parse_form_data): should return an
empty Hash if the body is empty. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/webrick/httputils.rb1
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index ebe90eff6..43bca9aa8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Dec 19 03:44:27 2003 GOTOU Yuuzou <gotoyuzo@notwork.org>
+
+ * 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 <usa@ruby-lang.org>
* lib/mkmf.rb (create_makefile): should remove deffile if it's
diff --git a/lib/webrick/httputils.rb b/lib/webrick/httputils.rb
index 6b8704cc7..78780c497 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