strange error with fcgi when stdin is not read untill EOF is reached.
__PPS__ <[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, I use fastcgi with apache 2.0.55 and I see a strange error. the result is internal server error. I code my apps in c++ and when I wrote file post code I wrote it in such a way that if posted data size is bigger than the max allowed limit, then only up to max data is read from stdin and the rest is discarded. in this case I see a strange behavior. here's a test case in more detail: I set max post size to 256KB. If I try to upload more than that everything is ok, but if I try to do that again in the next request I get internal server error (sometimes I need to repeat reposting large files a couple of times, and then each request where stdin is not read until EOF generates this error). I also tried to use fcgid and with it I get the same error but on the first request. here's what I got in error.log: [error] [client 192.168.0.128] (OS 233)No process is on the other end of the pipe. : FastCGI: comm with server "E:/Apache2/fastcgi/fcgid_m.exe" aborted: WriteFile() failed, referer: http://block111.servehttp.com/main/fastcgi/fcgid_m [error] [client 192.168.0.128] FastCGI: incomplete headers (0 bytes) received from server "E:/Apache2/fastcgi/fcgid_m.exe", referer: http://block111.servehttp.com/main/fastcgi/fcgid_m if I simply add a line to skip data from stdin to the end then there's no this error anymore: while (fgetc(stdin) != EOF) ; Is it something wrong with mod_fastcgi or do I have to read stdin until EOF is reached or not to read from stdin at all? thanks ___________________________________ fastcgi-developers mailing list http://fastcgi.com/fastcgi-developers/