Bug 143023 - nph-*.cgi scripts get buffered anyway
nph-*.cgi scripts get buffered anyway
Product: Fedora
Classification: Fedora
Component: httpd (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Joe Orton
Depends On:
  Show dependency treegraph
Reported: 2004-12-15 15:18 EST by Troy Davis
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-12-15 16:34:08 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Troy Davis 2004-12-15 15:18:36 EST
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):

How reproducible:

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:
Comment 1 Joe Orton 2004-12-15 16:14:12 EST
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.
Comment 2 Troy Davis 2004-12-15 16:33:34 EST
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,
Comment 3 Joe Orton 2004-12-15 18:04:32 EST
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.

Note You need to log in before you can comment on or make changes to this bug.