httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Förtsch <torsten.foert...@gmx.net>
Subject Is it intentional that the Timeout must hit twice for a CGI script to be killed?
Date Sat, 19 Jan 2013 19:21:09 GMT
Hi,

cgi_handler() in 2.2 contains these lines. For trunk they look very similar.

    if (!nph) {
        const char *location;
        char sbuf[MAX_STRING_LEN];
        int ret;

        if ((ret = ap_scan_script_header_err_brigade(r, bb, sbuf))) {
            ret = log_script(r, conf, ret, dbuf, sbuf, bb, script_err);

Now, if the script does not generate any output not even headers
ap_scan_script_header_err_brigade() polls the script's stdout and stderr
until the timeout is reached. Then log_script() is called which calls
discard_script_output() and, thus, again ends up in cgi_bucket_read()
waiting for the second timeout.

Is that intentional?

Torsten

Mime
View raw message