Re: HTTP doesn't work after upgrading from 2.0.55 to 2.2.15

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi William,

I reckon it should be mod_cgi, the CGI library I use is called "GNU CGI Library in C, v0.9.5" which has been maintained for many years. 

The function below is the way the CGI init and open the stream.

gcgiReturnType
initCgi( )
{
    /* Dup stdout to gcgiOut */
    gcgifd = dup(fileno(stdout));
    gcgiOut = fdopen(gcgifd, "w");
.
.

}


Then, free the resource but I didn't see it close the file descriptor. It duplicate the standard output, is that the reason that don't have to close it? I've tried to close the stdout, stderr, gcgiOut, stdin, but that didn't work.

void
freeCgi( )
{
    freeCgiQuery();

    if (envVariablesFile != NULL) XFREE(envVariablesFile);
    if (cgiQueryFile != NULL) XFREE(cgiQueryFile);
}

Thanks,

Best regards,
honercek


On Fri, May 28, 2010 at 12:26 PM, William A. Rowe Jr. <wrowe@xxxxxxxxxxxxx> wrote:
On 5/26/2010 8:24 AM, Chen Chien-Yu wrote:
>
> It seems that some packets are queued in the Apache, ..?!
> I describe the process as below,
> 1. Client send http request to the server, http://myhost/web.cgi, the
> cgi is implemented in GNU CGI which has been dead since 2002.

If the CGI closes the stream (EOF) then everything should still work out
alright.  How do you handle the CGI within httpd?  mod_cgi, mod_cgid, or
with mod_fcgid?  Or with some other module?



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux