httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Skolnick <cl...@organic.com>
Subject apache spinning...
Date Fri, 08 Mar 1996 00:35:22 GMT

I found a few httpd were spinning and tracked it down to again no error
checking of a system function.  In read_client_block() or in the 
procedure callign it we need ot check error returns.

The read_client_block() call in mod_cgi was the guilty part, here is a patch.

*** mod_cgi.c-bak       Thu Mar  7 16:34:26 1996
--- mod_cgi.c   Thu Mar  7 16:33:04 1996
***************
*** 355,360 ****
--- 355,362 ----
            if (len_to_read > HUGE_STRING_LEN) len_to_read = HUGE_STRING_LEN;
            
            len_read = read_client_block (r, argsbuffer, len_to_read);
+           if (len_read == 0)
+               break;
            fwrite (argsbuffer, 1, len_read, script_out);
            remaining -= len_read;
        }


--
Cliff Skolnick                                      cliff@organic.com

"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety." -- Benjamin Franklin, 1759


Mime
View raw message