Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 7896 invoked from network); 9 Feb 2011 20:22:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Feb 2011 20:22:23 -0000 Received: (qmail 93806 invoked by uid 500); 9 Feb 2011 20:22:22 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 93452 invoked by uid 500); 9 Feb 2011 20:22:22 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 93443 invoked by uid 99); 9 Feb 2011 20:22:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Feb 2011 20:22:21 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Feb 2011 20:22:20 +0000 Received: from thor.apache.org (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id p19KLwsO027362 for ; Wed, 9 Feb 2011 20:21:58 GMT Received: (from daemon@localhost) by thor.apache.org (8.13.8+Sun/8.13.8/Submit) id p19KLwtZ027361; Wed, 9 Feb 2011 15:21:58 -0500 (EST) Date: Wed, 9 Feb 2011 15:21:58 -0500 (EST) Message-Id: <201102092021.p19KLwtZ027361@thor.apache.org> From: bugzilla@apache.org To: dev@tomcat.apache.org Subject: DO NOT REPLY [Bug 50747] CometProcessor does not flush and close HTTP/1.0 requests X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Tomcat 7 X-Bugzilla-Component: Catalina X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: frank.schroeder@gmail.com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dev@tomcat.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: OS/Version In-Reply-To: References: X-Bugzilla-URL: https://issues.apache.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org https://issues.apache.org/bugzilla/show_bug.cgi?id=50747 Frank Schroeder changed: What |Removed |Added ---------------------------------------------------------------------------- OS/Version| |All --- Comment #1 from Frank Schroeder 2011-02-09 15:21:54 EST --- I've found the problem. The following sequence works with HTTP/1.1 but not with HTTP/1.0. I guess I've made a classical optimization mistake. This also explains why the content length and encoding headers were never set. String data = "..."; PrintWriter writer = response.getWriter(); response.setStatus(200); response.setCharacterEncoding("UTF-8"); response.setContentLength(data.length()); writer.write(data); writer.flush(); event.close(); Getting the Writer *after* setting the response headers makes it all work String data = "..."; response.setStatus(200); response.setCharacterEncoding("UTF-8"); response.setContentLength(data.length()); PrintWriter writer = response.getWriter(); writer.write(data); writer.flush(); event.close(); -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org