Return-Path: Delivered-To: apmail-jakarta-httpcomponents-commits-archive@www.apache.org Received: (qmail 99570 invoked from network); 16 Jun 2007 12:06:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Jun 2007 12:06:33 -0000 Received: (qmail 11794 invoked by uid 500); 16 Jun 2007 12:06:37 -0000 Delivered-To: apmail-jakarta-httpcomponents-commits-archive@jakarta.apache.org Received: (qmail 11779 invoked by uid 500); 16 Jun 2007 12:06:37 -0000 Mailing-List: contact httpcomponents-commits-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: httpcomponents-dev@jakarta.apache.org Delivered-To: mailing list httpcomponents-commits@jakarta.apache.org Received: (qmail 11770 invoked by uid 99); 16 Jun 2007 12:06:37 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Jun 2007 05:06:37 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Jun 2007 05:06:33 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 1CD251A981A; Sat, 16 Jun 2007 05:06:13 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r547912 - /jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpServiceHandler.java Date: Sat, 16 Jun 2007 12:06:13 -0000 To: httpcomponents-commits@jakarta.apache.org From: olegk@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070616120613.1CD251A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: olegk Date: Sat Jun 16 05:06:12 2007 New Revision: 547912 URL: http://svn.apache.org/viewvc?view=rev&rev=547912 Log: HTTPCORE-64: Do not create a new HTTP context per each request execution. Request handlers may need to persist some custom state information between invocations. Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpServiceHandler.java Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpServiceHandler.java URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpServiceHandler.java?view=diff&rev=547912&r1=547911&r2=547912 ============================================================================== --- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpServiceHandler.java (original) +++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpServiceHandler.java Sat Jun 16 05:06:12 2007 @@ -271,8 +271,7 @@ public void run() { try { - HttpContext context = new HttpExecutionContext(conn.getContext()); - handleRequest(connState, conn, request, context); + handleRequest(connState, conn); } catch (IOException ex) { shutdownConnection(conn); @@ -461,11 +460,12 @@ private void handleRequest( final ServerConnState connState, - final NHttpServerConnection conn, - final HttpRequest request, - final HttpContext context) throws HttpException, IOException { + final NHttpServerConnection conn) throws HttpException, IOException { waitForOutputState(connState, ServerConnState.READY); + + HttpContext context = conn.getContext(); + HttpRequest request = connState.getRequest(); HttpParamsLinker.link(request, this.params);