RE: How to use FCGI_StartFilterData(void) function?

yalcin Bozcaada (bozcaada@OpenMarket.com)
Thu, 24 Jul 1997 13:19:25 -0400

Message-Id: <01BC9834.3DF132F0@w1-139.openmarket.com>
From: yalcin Bozcaada <bozcaada@OpenMarket.com>
To: "fastcgi-developers@openmarket.com"
Subject: RE: How to use FCGI_StartFilterData(void) function?
Date: Thu, 24 Jul 1997 13:19:25 -0400

You have to clear out your stdin before you use
this function. A quick look like following would do:
(of course everything would be in FCGI_Accept() loop ) 

while( getc(stdin) != EOF ) ; 

Then you call this function. 

FCGI_StartFilterData();

This function changes your pointer to the content that is to be filtered.
Then you can access t othis content simply with
 
fread( content, 1, content_size, stdin) ;

 ( and your filtering algorythym goes here)

then with fwrite, you send your filtered content back.

here is the last trick. You must append a \r\n to your content before sending.
(based on fcgi-devel-kit 1.5.1)

hope this helps.

-yalcin

----------
From: 	Sonya Rikhtverchik
Sent: 	Thursday, July 24, 1997 10:27 AM
To: 	fastcgi-developers@openmarket.com
Subject: 	How to use FCGI_StartFilterData(void) function?

From: Seo kyung-duck (9202561) =?EUC-KR?B?vK2w5rT2?= 
<kdseo@concert.comeng.chungnam.ac.kr>
Message-Id: <199707240049.JAA24252@concert.comeng.chungnam.ac.kr>
Subject: How to use FCGI_StartFilterData(void) function ?
To: fastcgi-developers@openmarket.com
Date: Thu, 24 Jul 1997 09:49:45 +0900 (KST)
X-Mailer: ELM [version 2.4 PL21-h4]
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-2022-kr
Content-Transfer-Encoding: 7bit
Content-Length: 179       

I'm studying fastcgi..
But , there aren't enough information.
If you have any short examples about FCGI_StartFilterData(void) function,
 please forward to me.
Thanx for reading.


------- End of Forwarded Message