$NetBSD: patch-aj,v 1.1.1.1 2005/03/06 16:36:08 taca Exp $ --- lib/cgi.rb.orig 2002-08-29 18:05:06.000000000 +0900 +++ lib/cgi.rb @@ -823,10 +823,13 @@ convert string charset, and set language end c = if bufsize < content_length - stdinput.read(bufsize) or '' + stdinput.read(bufsize) else - stdinput.read(content_length) or '' + stdinput.read(content_length) end + if c.nil? + raise EOFError, "bad content body" + end buf += c content_length -= c.size