httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William A Rowe Jr <>
Subject Re: Detecting client aborts and stream resets
Date Tue, 03 May 2016 15:35:37 GMT
On Tue, May 3, 2016 at 9:31 AM, Michael Kaufmann <>

> Hi all,
> a content generator module can detect client aborts and stream resets
> while it reads the request body. But how can it detect this afterwards,
> while the response is being generated?
> This is important for HTTP/2, because the client may reset a stream, and
> mod_http2 needs to wait for the content generator to finish. Therefore the
> content generator should stop generating the response when it is no longer
> needed.
> Is there any API for this? The "conn_rec->aborted" flag exists, but which
> Apache function sets this flag?
> If there is no API, maybe an optional function for mod_http2 would be a
> solution.

Nope - an optional function in mod_http2 is too special case, generators
must remain protocol (socket or other transport) agnostic.

In the case of mod_cache'd content, the generator can't quit, it is already
populating a cache, which means you'll generate an invalid cached object.

But if you knew that the cache module wasn't collecting info, r->c->aborted
tells you if anyone is still listening, right?

View raw message