Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 22D32200AE3 for ; Wed, 4 May 2016 09:51:15 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 213381609FD; Wed, 4 May 2016 09:51:15 +0200 (CEST) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7362C1609F1 for ; Wed, 4 May 2016 09:51:14 +0200 (CEST) Received: (qmail 95892 invoked by uid 500); 4 May 2016 07:51:13 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 95882 invoked by uid 99); 4 May 2016 07:51:13 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 May 2016 07:51:13 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id E835FCA3AC for ; Wed, 4 May 2016 07:51:12 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -2.18 X-Spam-Level: X-Spam-Status: No, score=-2.18 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RP_MATCHES_RCVD=-2.079, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=greenbytes.de header.b=MuvLFMSj; dkim=pass (1024-bit key) header.d=greenbytes.de header.b=NcxfCTDx Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id m0VV5rKw91Zb for ; Wed, 4 May 2016 07:51:10 +0000 (UTC) Received: from mail.greenbytes.de (mail.greenbytes.de [5.10.171.186]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id E0C325F244 for ; Wed, 4 May 2016 07:51:09 +0000 (UTC) Received: by mail.greenbytes.de (Postfix, from userid 117) id 48ACB15A08FA; Wed, 4 May 2016 09:51:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=greenbytes.de; s=mail; t=1462348263; bh=To9NH1qa9CvMEX5JWNDwC1yUiruWIEvViU+hzkfXn/Y=; h=Subject:From:In-Reply-To:Date:References:To:From; b=MuvLFMSjnnMGSjmgViw1nNRE2+lvEL4R7ke7EOGhe7uE/85HmQihr6ppK10IXQneb ZvCC4zpvvYTQvTciq3IPhS/ds4cO4si7oqe+210YIPqmcv5WF3W27+9vJlp/C4DVNP MtDrIgIsh4gkVogk3plFXIggd5Bze7bnMYQA7aOU= Received: from [192.168.1.42] (unknown [192.168.1.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mail.greenbytes.de (Postfix) with ESMTPSA id D6B9615A0399 for ; Wed, 4 May 2016 09:51:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=greenbytes.de; s=mail; t=1462348262; bh=To9NH1qa9CvMEX5JWNDwC1yUiruWIEvViU+hzkfXn/Y=; h=Subject:From:In-Reply-To:Date:References:To:From; b=NcxfCTDxPyt+iR723ukhQYIUgcbm4MhM0LxjdH8e90QPPJ4x7pQ5Y2SM0b2nqY4rj YKraERknrLvs4YRyx+yMsF63G3oafZSyQAWxP6ip5M1v2F0Oe+TcvNk1WggwTywmiM 3PgoLtrcGpF01VubvPNOoCQdsLIOQXU/4eNrmwrY= Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: Detecting client aborts and stream resets From: Stefan Eissing In-Reply-To: Date: Wed, 4 May 2016 09:51:02 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20160503163109.Horde.dDuX6tl_vMFkpJE75Qne6Q0@webmail.michael-kaufmann.ch> To: dev@httpd.apache.org X-Mailer: Apple Mail (2.3124) archived-at: Wed, 04 May 2016 07:51:15 -0000 > Am 03.05.2016 um 17:35 schrieb William A Rowe Jr = : >=20 > On Tue, May 3, 2016 at 9:31 AM, Michael Kaufmann = wrote: > Hi all, >=20 > 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? >=20 > 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. >=20 > Is there any API for this? The "conn_rec->aborted" flag exists, but = which Apache function sets this flag? conn_rec->aborted is currently not set by mod_http2 on slave = connections, but should. I'll add that. > If there is no API, maybe an optional function for mod_http2 would be = a solution. >=20 > Nope - an optional function in mod_http2 is too special case, = generators > must remain protocol (socket or other transport) agnostic. >=20 > 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. >=20 > But if you knew that the cache module wasn't collecting info, = r->c->aborted > tells you if anyone is still listening, right? William is right, this is not a good idea. The ->aborted flag should = serve this purpose of telling anyone interested that this connection is = not longer delivering. I will make a github release soon where that is = working and you can test. -Stefan=