Re: How to detect aborted requests using FastCgiExternalServer

Valentin Kozamernik <[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel,gmane.spam.detected
Message-ID <[email protected]>
Thank you very much, David.


On Mon, 24 Dec 2007 at 15:37, David Birnbaum wrote:

> I've spoken with Rob about this, and it seems (to me) that the whole
> issue of how to pass a client close() back to the FastCGI
> application needs another look.

Does this mean I can expect the problem to be fixed in a later
version?  I could try to patch things myself, but I am facing many
deadlines right now and I have never looked at mod_fastcgi source code
so far, so it would take a while.


> I believe Rob ran into some problems with different operating
> systems, but my feeling is that when httpd detects the client go
> away, it should close() the FastCGI socket, and the library should
> detect that.  Instead of getting a SIGPIPE from the proc manager,
> any write/send on the socket should fail with an ENOCONNECT or
> something similar.  It seems like we should be able to make that
> platform independent at this stage of the game.

In this case, I belive that libfcgi should raise SIGPIPE itself,
anyway.  There are probably webapps out there that set signal
handlers, and such a change would break them otherwise.


Tin



> On Wed, 19 Dec 2007, Valentin Kozamernik wrote:
>
>> Hello!
>>
>> What is the proper way of detecting aborted requests (e.g. when the
>> user clicks the browser's stop button) when using mod_fastcgi to
>> connect to an external FastCGI server?
>>
>> I am writing a stand-alone FastCGI server and my tests show that
>> mod_fastcgi doesn't close the connection and doesn't send a
>> FCGI_ABORT_REQUEST message.  It can't raise SIGPIPE, of course.
>>
>> I am using mod_fastcgi 2.4.2 on OpenBSD 4.2 (heavily patched Apache
>> 1.3.29).
>>
>> I also tried the latest version which should have Peter Zijlstra's
>> patch included (I don't know whether this is relevant).
>>
>> Thank you!
>>
>> --
>> Tin
>> ___________________________________
>> fastcgi-developers mailing list
>> http://fastcgi.com/fastcgi-developers/
>>

--
Tin
___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.