I have a FCGI application written in C. We have cases where a client closes an active connection--i.e. leaves the page during page load--which we'd like to detect within the application, if possible. We have our web server (nginx) configured to close the FCGI connection when the client connection is unexpectedly closed, so my hope is that by looking at the FCGI stream state at the end of the transaction, we might be able to detect a client-initiated closed connection.
My question is: Is it possible to detect this using FCGX_GetError() on the output stream right before calling FCGX_Finish_r() ? If not, how might I trap such a condition?
I tried asking on the FastCGI mailing list, but it would seem that the list is down.