summaryrefslogtreecommitdiff
path: root/lib/webrick
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
commitf75aff0139347afb89fcb931f6cc78703bb5c36a (patch)
tree2520f19869850654c735365871f96115b0e774cb /lib/webrick
parentb3b5b5e6b600d52ed429cdcf19144e431ab17296 (diff)
* 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
Diffstat (limited to 'lib/webrick')
-rw-r--r--lib/webrick/httputils.rb1
1 files changed, 1 insertions, 0 deletions
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