Return-Path: Delivered-To: apmail-httpd-modules-dev-archive@locus.apache.org Received: (qmail 70306 invoked from network); 1 Feb 2008 17:12:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Feb 2008 17:12:28 -0000 Received: (qmail 94561 invoked by uid 500); 1 Feb 2008 17:12:18 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 94551 invoked by uid 500); 1 Feb 2008 17:12:18 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 94542 invoked by uid 99); 1 Feb 2008 17:12:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Feb 2008 09:12:18 -0800 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [213.136.52.68] (HELO mailgate.mysql.com) (213.136.52.68) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Feb 2008 17:11:50 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate.mysql.com (8.13.8/8.13.8) with ESMTP id m11HBtNx012021 for ; Fri, 1 Feb 2008 18:11:55 +0100 Received: from mail.mysql.com ([10.222.1.99]) by localhost (mailgate.mysql.com [10.222.1.98]) (amavisd-new, port 10026) with LMTP id 06092-07 for ; Fri, 1 Feb 2008 18:11:55 +0100 (CET) Received: from sam-by-land.lenoxway.net (m198-158.dsl.rawbw.com [198.144.198.158]) (authenticated bits=0) by mail.mysql.com (8.13.3/8.13.3) with ESMTP id m11HBiTR003211 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Fri, 1 Feb 2008 18:11:46 +0100 Message-Id: <2C090416-A3AE-47C9-8B48-BCFCEBAA7910@mysql.com> From: John David Duncan To: modules-dev@httpd.apache.org In-Reply-To: <1201885196.2426.129.camel@lost.cnet.cnwk> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v915) Subject: Re: Behaviour for Connection: close Date: Fri, 1 Feb 2008 09:11:43 -0800 References: <1201885196.2426.129.camel@lost.cnet.cnwk> X-Mailer: Apple Mail (2.915) X-Virus-Scanned: by amavisd-new at mailgate.mysql.com X-Virus-Checked: Checked by ClamAV on apache.org Hi Ronald, I can't answer your question. But I wanted to mention: as I understand the standard, you should be returning a "202 Accepted" rather than a 200 in this case. JD On Feb 1, 2008, at 8:59 AM, Ronald Park wrote: > I'm writing a module which is intended to do it's work > 'asynchronously'. My module takes the body of a POST, > stores it into a note and immediately generates a response > code of 200. Then, during the logging stage, it does > that actual work (in my case, writing stuff into a db). > > I have 'KeepAlives off' and, as expected, Apache sends > back the 200 and 'Connection: close'... however, it does > not "immediately" close the socket. It proceeds to do > logging and runs my code *then* closes the socket. > > The behavior is fine for some clients, those that see the > 'Connection: close' and close their connections themselves. > For them, my module is 'asynchronous'. For others clients > though, ones which wait for the server to close, it's not; > their requests are practically synchronous (actually, a > little slower). > > Is there a way to hook my module in absolutely after the > close is called? Is there a way to get the socket close > to occur immediately after the response is sent? > > Or, am I going to have to do something like spawning off > a thread, copying all the request data into that thread > (so it doesn't go poof when the request pool is destroyed) > and doing my work in that thread? :( > > Thanks, > Ron >