https://issues.apache.org/bugzilla/show_bug.cgi?id=50948

           Summary: Connection not closed when CGI dies waiting for POST
                    data
           Product: Apache httpd-2
           Version: 2.2.17
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_cgi
        AssignedTo: [email protected]
        ReportedBy: [email protected]


When a CGI program dies while it is waiting for the client to send its POST
data, Apache does not reap the child process and close the connection but
instead waits for whatever timeout is configured globally before closing the
connection. This seems senseless as there's nothing to be done once the child
has exited.

Consider this simple Perl script:

<snip>
#!/usr/bin/perl

$SIG{ALRM} = sub { die };
alarm 5;
sysread STDIN, $data, 4096;

END {
  print "Content-Type: text/plain\n\n";
  print $data;
}
</snip>

and this client request sending all the headers but no body and keeping the
connection open:

<snip>
POST /test.cgi HTTP/1.1
Host: localhost
Content-Length: 10

</snip>

After the five seconds timeout the child will hang around as a zombie but the
connection is still open.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to