Hello Michael.

On 5/3/2016 7:31 AM, Michael Kaufmann wrote:
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?
The conn_rec->aborted flag is set in the following functions:
        - ap_core_output_filter() in server/core_filters.c
        - ap_process_connection() in server/connection.c
        - process_socket() in server/mpm/event/event.c
        - worker_main() in server/mpm/winnt/child.c
If there is no API, maybe an optional function for mod_http2 would be a solution.

Regards,
Michael



Reply via email to