From: gv@... (Gerard A.W. Vreeswijk) Date: 2004-09-16T17:54:58+09:00 Subject: eRuby 1.0.4 truncated content problem Hi all, I have a very difficult to trace-down problem with - Apache 1.3.20 (Win32) - eRuby version 1.0.4 - ruby 1.8.2 (2004-07-29) [i386-mswin32] Currently it seems I ran out of options, so I thought I post it. Here it is. When I query the script foo.cgi (yes, it's a CGI -- no mod_ruby involved; for reasons why is a different story) ================================================== #!/ruby/bin/eruby % 1.upto(1000) { |x| <%= x %>, % } ================================================== with ================================================== #!/ruby/bin/ruby require 'net/http' h = Net::HTTP.new('localhost', 80) resp, data = h.get('/foo.cgi', nil ) puts "Code = #{resp.code}" puts "Message = #{resp.message}" resp.each {|key, val| printf "%17s = %-40.40s\n", key, val } puts p data[-50..-1] puts p data.length ================================================== I get ================================================== Code = 200 Message = OK connection = close content-type = text/html; charset=iso-8859-1 date = Wed, 15 Sep 2004 20:02:16 GMT server = Apache/1.3.20 (Win32) content-length = 7926 " 886,\r\n 887,\r\n 888,\r\n 889,\r\n 890,\r\n 891" 7926 ================================================== In other words, the content gets truncated, and I suspect that either eRuby or Apache does not incorporate the Win2 carriage returns in the content-length count. This is a weird problem to me because the apache/eRuby/ruby combo works fine on two other machines, which both happen to be Win2000. On those machines, the output is like ================================================== Code = 200 Message = OK connection = close content-type = text/html; charset=iso-8859-1 date = Wed, 15 Sep 2004 20:02:16 GMT server = Apache/1.3.20 (Win32) content-length = [some number] " 998,\n 999,\n 1000, \n\n\n\n" [same number] ================================================== i.e., without the carriage returns and full content. The present machine is installed with WinXP which is firewalled as opposed to the other two machines. (Dunno if that's relevant, probably not.) I've tested with Apache 2.0.50 --- same problem. Any ideas? Thanks.