You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Evgeny Shvidky <ev...@inovvia.com> on 2012/05/13 17:30:29 UTC

[users@httpd] "Close" HTTP connection callback/hook

Hi,

I am implementing a new module on C.
I need to perform some functionality when a user closes a HTTP connection before he received any response for his request.
How can I know when a HTTP user request state has been changed/closed?
Is there any callback/hook for this functionality I can register?

Thanks,
Evgeny

Re: [users@httpd] "Close" HTTP connection callback/hook

Posted by Eric Covener <co...@gmail.com>.
On Mon, May 14, 2012 at 1:47 AM, Evgeny Shvidky <ev...@inovvia.com> wrote:
> Hi,
>
> Thank you for a quick answer.
> Your suggestion is interesting but it doesn't meet exactly my needs.
> The problem that this callback will be called after every HTTP session even if my module sent response to a user.
> Can I register a callback function only for "unexpected" user close request (before my module responded)?

No, but you can remember how successful your handler was on the last
request that it saw if you hook the end of each request or the end of
the connection.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] "Close" HTTP connection callback/hook

Posted by Evgeny Shvidky <ev...@inovvia.com>.
Hi,

Thank you for a quick answer.
Your suggestion is interesting but it doesn't meet exactly my needs.
The problem that this callback will be called after every HTTP session even if my module sent response to a user.
Can I register a callback function only for "unexpected" user close request (before my module responded)?

Thanks,
Evgeny

-----Original Message-----
From: Nick Kew [mailto:nick@webthing.com] 
Sent: Sunday, May 13, 2012 10:55 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] "Close" HTTP connection callback/hook


On 13 May 2012, at 16:30, Evgeny Shvidky wrote:

> Hi,
>  
> I am implementing a new module on C.

You'd probably be better-off on the modules list.

> I need to perform some functionality when a user closes a HTTP connection before he received any response for his request.
> How can I know when a HTTP user request state has been changed/closed?
> Is there any callback/hook for this functionality I can register?

You can register your function as a cleanup on the connection's pool, if that meets your needs.

--
Nick Kew
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] "Close" HTTP connection callback/hook

Posted by Nick Kew <ni...@webthing.com>.
On 13 May 2012, at 16:30, Evgeny Shvidky wrote:

> Hi,
>  
> I am implementing a new module on C.

You'd probably be better-off on the modules list.

> I need to perform some functionality when a user closes a HTTP connection before he received any response for his request.
> How can I know when a HTTP user request state has been changed/closed?
> Is there any callback/hook for this functionality I can register?

You can register your function as a cleanup on the connection's pool,
if that meets your needs.

-- 
Nick Kew
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org