Bug 143023 - nph-*.cgi scripts get buffered anyway
Summary: nph-*.cgi scripts get buffered anyway
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: httpd
Version: 2
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Joe Orton
QA Contact:
URL: http://simile.metaphorstudio.com/cgi-...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-12-15 20:18 UTC by Troy Davis
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-12-15 21:34:08 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Troy Davis 2004-12-15 20:18:36 UTC
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:

Comment 1 Joe Orton 2004-12-15 21:14:12 UTC
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 21:33:34 UTC
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

Comment 3 Joe Orton 2004-12-15 23:04:32 UTC
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.