From 9911bca1e2774c959993093814c46f05b3c8b7ff Mon Sep 17 00:00:00 2001 From: matz Date: Sat, 23 Sep 2006 12:47:11 +0000 Subject: [PATCH] * lib/cgi.rb (CGI::QueryExtension::read_multipart): CGI content may be empty. a patch from Jamis Buck . git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ lib/cgi.rb | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 74292afc14..9d212645a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Sep 23 21:34:15 2006 Yukihiro Matsumoto + + * lib/cgi.rb (CGI::QueryExtension::read_multipart): CGI content + may be empty. a patch from Jamis Buck . + Sat Sep 23 20:54:28 2006 K.Kosako * oniguruma.h: Version 4.4.4 diff --git a/lib/cgi.rb b/lib/cgi.rb index 8d6705c44a..a10e46eaac 100644 --- a/lib/cgi.rb +++ b/lib/cgi.rb @@ -1015,7 +1015,7 @@ class CGI else stdinput.read(content_length) end - if c.nil? + if c.nil? || c.empty? raise EOFError, "bad content body" end buf.concat(c)