In message <20030923094845.A32994 / freeze.org>,
 `Jim Freeze <jim / freeze.org>' wrote:
> On Tuesday, 23 September 2003 at 22:34:07 +0900, GOTOU Yuuzou wrote:
> > Could you get error message with ruby -v?
> 
> Good idea.
> I get the following:
> 
> Exception `WEBrick::HTTPStatus::InternalServerError' at
> /tools/apps/ruby/ruby-1.8.0/lib/ruby/site_ruby/1.8/webrick/httpservlet/cgihandler.rb:75
> - The server encontered a script error.
> afropuff.mis.cypress.com - - [23/Sep/2003:09:45:58 EDT] "GET /ruwiki.cgi
> HTTP/1.1" 500 334
> - -> /ruwiki.cgi
> 
> 
>     72          data = "" unless data
>     73          raw_header, body = data.split(/^[\xd\xa]+/on, 2)
>     74          raise HTTPStatus::InternalServerError,
>     75            "The server encontered a script error." if body.nil?
>     76

   ary = [ "", "\n", "foo: bar", "foo: bar\n", "foo:bar\n\n" ]
   ary.each{|data|
     a, b = data.split(/^[\xd\xa]+/on, 2)
     p [ data, a, b ]
   }

result is:

   ["", nil, nil]
   ["\n", "", ""]
   ["foo: bar", "foo: bar", nil]
   ["foo: bar\n", "foo: bar\n", nil]
   ["foo:bar\n\n", "foo:bar\n", ""]

It seems that output of CGI is empty or doesn't include
separator of headers and message-body.
It may be that WEBrick couldn't get CGI output correctly;-)

-- 
gotoyuzo