I have the code to write a headers to the fastcgi outstream. In case the write body fails, I want to attempt to write new headers indicating the failure mode without the original headers being sent.

BTW, this is in C.

How can I "unget" FCGX_PutStr() ?

cheers

有帮助吗?

解决方案

Ok,

You cannot clear a stream directly.

You must free the stream using FCGX_FreeStream(reqDataPtr->out);

You must create a new stream using reqDataPtr->out = NewWriter(reqDataPtr, 8192, FCGI_STDOUT);

cheers

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top