question about eof

jing ding <[email protected]> Tue, 25 Jan 2011 16:06:51 +0800
Newsgroups gmane.comp.web.fastcgi.devel
Message-ID <[email protected]>
hi,

   in my program, i use apache+fastcgi++ to build up a file-uploader which
web user post file to
fcgi program. i read 2048 bytes data from input stream each loop,  it mostly
looks like below:

fcgi_streambuf cin_fcgi_streambuf(rGFUploadParam.request.in);
istream fcgi_cin(&cin_fcgi_streambuf);


while ( ...) {
     if (fcgi_cin.eof() || fcgi_cin.fail() || fcgi_cin.bad()) break;

     fcgi_cin.read(buf, 2048);
     int cnt = fcgi_cin.gcount();


}

the fcgi_cin stream always get eof error before it really get the real total
size of the uploaded file,
could i just ignore the eof bit?


Sincerely,

airover





-- 
where there is a will,there is a way!

_______________________________________________
FastCGI-developers mailing list
FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org
http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers