From users-return-255633-apmail-tomcat-users-archive=tomcat.apache.org@tomcat.apache.org Wed Dec 2 20:08:54 2015 Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 523AB18AF4 for ; Wed, 2 Dec 2015 20:08:54 +0000 (UTC) Received: (qmail 31066 invoked by uid 500); 2 Dec 2015 20:08:51 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 31002 invoked by uid 500); 2 Dec 2015 20:08:51 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 30974 invoked by uid 99); 2 Dec 2015 20:08:51 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Dec 2015 20:08:51 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id D454CC0FDE for ; Wed, 2 Dec 2015 20:08:50 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1 X-Spam-Level: * X-Spam-Status: No, score=1 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 72R9gxev-DjB for ; Wed, 2 Dec 2015 20:08:50 +0000 (UTC) Received: from vms173023pub.verizon.net (vms173023pub.verizon.net [206.46.173.23]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 5360020C40 for ; Wed, 2 Dec 2015 20:08:49 +0000 (UTC) Received: from Christophers-MacBook-Pro.local ([71.127.40.115]) by vms173023.mailsrvcs.net (Oracle Communications Messaging Server 7.0.5.32.0 64bit (built Jul 16 2014)) with ESMTPA id <0NYQ00BS9YLO14G0@vms173023.mailsrvcs.net> for users@tomcat.apache.org; Wed, 02 Dec 2015 14:08:12 -0600 (CST) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=btqxfxui c=1 sm=1 tr=0 a=tVXBnewmVzifmTgg5+7jYA==:117 a=-57I09spAAAA:8 a=oR5dmqMzAAAA:8 a=IkcTkHD0fZMA:10 a=wUQvQvOEmiQA:10 a=COgIOIfSmuRzqV_Eb6IA:9 a=QEXdDO2ut3YA:10 Subject: Re: No access log line if client aborts To: Tomcat Users List References: From: Christopher Schultz Message-id: <565F4FAC.6010505@christopherschultz.net> Date: Wed, 02 Dec 2015 15:08:12 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-version: 1.0 In-reply-to: Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 7bit Mike, On 12/2/15 2:13 PM, Mike Wartes wrote: > I'm having a problem where requests made to Tomcat that the client aborts > early wind up not producing an access log line. I've reproduced it on > Tomcat 7.0.39 and Tomcat 8.0.28. > > The repro case is pretty easy. Just use a browser to make a request to any > application endpoint and then close the browser tab before the request > finishes. Can you confirm whether the request line has been sent to Tomcat at this point? > Stepping through the Tomcat source code it's pretty clear why the access > log is skipped in this case. The CoyoteAdapter calls > response.finishResponse() before calling the access log. If the client is > gone, the finishResponse method throws an exception when trying to flush > its output buffer, which causes the access log line to be skipped. > > Does anyone have any insight into this problem? Sounds like it would be pretty easy to correct this problem if it's as simple as you describe. -chris --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org