From: Chris Morris Date: 2003-03-19T23:51:15+09:00 Subject: Why does basic cgi example fail on Apache/Windows? This has come up in the past, but why does this bare-bones cgi example (from Pickaxe) fail on Apache/Windows? #!c:/ruby/bin/ruby.exe print "HTTP/1.0 200 OK\r\n" print "Content-type: text/html\r\n\r\n" print "Hello World!\r\n" Error log says: malformed header from script. Bad header=HTTP/1.0 200 OK: test.rb Anything using 'cgi' works, what is it doing to comfort Apache that the above does not do? A packet sniff of what comes out of a successful .rb script using the 'cgi' module shows this header: HTTP/1.1 200 OK Date: Wed, 19 Mar 2003 14:34:06 GMT Server: Apache/1.3.14 (Win32) Content-Length: 1120 Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/html End of lines are OD OA (\r\n), same as above. Tried Apache 2.0.44 and Apache 1.3.14 running on Windows 2k, both don't like the test.rb header (although that same header works fine on IIS...) Chris http://clabs.org