FstCGI: How to clear the out stream?
-
11-12-2019 - |
質問
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
所属していません StackOverflow