From Bugzilla Helper: User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.12 Description of problem: Apache won't unbuffer output from nph-*.cgi scripts. Long cgi processes will result in timeouts, or only display output when complete. Version-Release number of selected component (if applicable): httpd-2.0.51-2.9 How reproducible: Always Steps to Reproduce: 1. Create a nph cgi script, see example at bottom of this page: http://www.hk8.org/old_web/linux/cgi/ch03_03.htm 2. Point your web browser to the nph cgi. Actual Results: No output is displayed until 30 seconds after the request, at which point the script exits and buffers are flushed. Expected Results: Incremental output, 1 line per second. Additional info:
Using what browser? It does get buffered in Firefox, I can reproduce that, but try pointing curl at it and you can see that the server is not doing the buffering: $ curl http://simile.metaphorstudio.com/cgi-bin/nph-count.cgi OK, starting time consuming process ... ... and indeed, even when tracing with ethereal against Firefox, the packets are crossing the network OK. Have you tried other browsers? I'm fairly sure I've tested nph- scripts to be non-buffered in Mozilla before so maybe this is a recent regression in Mozilla/Firefox.
Very odd. I just tried MSIE 5.2, Safari 1.2.4, Firefox 1.0 preview and Mozilla 1.7.3 on Mac OS X. None of the GUI browsers display the data until the process finishes. But I can confirm that curl sees the data coming back in real time, and MSIE 6.0.2800.1106 on Win2k starts showing realtime data around iteration 16. My apologies, I thought I had stumbled upon an old bug that resurfaced. I would normally consider this scenario to be highly unlikely, but either the problem exists within all four browsers I typically use, or an API used by all four programs. I'll send this info to Apple next, seems a little too consistent to be a conicidence. Thank You, Troy
It may be a size of data thing: try a script which sends larger blocks of data in each iteration, maybe that'll kick the browsers into action. I'd be interested in hearing about any resolution you find to this anyway.