httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 8388] New: - Long running CGI script cannot terminated by browser
Date Tue, 23 Apr 2002 01:02:42 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8388>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8388

Long running CGI script cannot terminated by browser

           Summary: Long running CGI script cannot terminated by browser
           Product: Apache httpd-2.0
           Version: 2.0.35
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: mod_cgi
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: qwan@seatab.com


When a CGI script runs for a long time and the user clicks the "Stop" or "Back" 
button in the browser before it ends, the server fails to terminate the CGI 
process on the server, even if the CGI script is frequently writing back 
lines.  Here's a sample partial CGI script:

$| = 1;
print "<pre>\n":
foreach (1 .. 50)
{
    print "line $_\n";
    sleep (1);
}

This script continues to run even if the user has clicked "Stop" in the browser 
5 seconds into the process.

I remember fixing this problem in Apache 1.3 by closing the right process 
handle.  But since 1.3 was not able to have unbuffered I/O to write back to the 
HTTP server process immediately, the fix was not useful for 1.3 anyway.  Now 
that 2.0 seems to be able to have unbuffered IO for CGI output (finally!), 
fixing this bug would be extremely helpful, especially in defeating MS.  This 
is a killer shortcoming of IIS where a run-away CGI script can never be 
terminated except the pre-defined "cut-off" time for all scripts.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message