Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 90264 invoked from network); 1 Jun 2006 08:01:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Jun 2006 08:01:16 -0000 Received: (qmail 17692 invoked by uid 500); 1 Jun 2006 08:01:14 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 16956 invoked by uid 500); 1 Jun 2006 08:01:12 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 16944 invoked by uid 99); 1 Jun 2006 08:01:11 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Jun 2006 01:01:11 -0700 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: 202.81.18.152 is neither permitted nor denied by domain of paulex.yang@gmail.com) Received: from [202.81.18.152] (HELO ausmtp04.au.ibm.com) (202.81.18.152) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Jun 2006 01:01:07 -0700 Received: from sd0208e0.au.ibm.com (d23rh904.au.ibm.com [202.81.18.202]) by ausmtp04.au.ibm.com (8.13.6/8.13.5) with ESMTP id k5183cme251416 for ; Thu, 1 Jun 2006 18:03:39 +1000 Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.250.237]) by sd0208e0.au.ibm.com (8.12.10/NCO/VER6.8) with ESMTP id k5183nSP187996 for ; Thu, 1 Jun 2006 18:04:03 +1000 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id k5180SGR019699 for ; Thu, 1 Jun 2006 18:00:28 +1000 Received: from d23m0011.cn.ibm.com (d23m0011.cn.ibm.com [9.181.32.74]) by d23av04.au.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id k5180R9R019542 for ; Thu, 1 Jun 2006 18:00:28 +1000 Received: from [127.0.0.1] ([9.181.106.114]) by d23m0011.cn.ibm.com (Lotus Domino Release 6.5.5HF262) with ESMTP id 2006060116002077-4245 ; Thu, 1 Jun 2006 16:00:20 +0800 Message-ID: <447E9E8E.2010105@gmail.com> Date: Thu, 01 Jun 2006 16:00:14 +0800 From: Paulex Yang User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: harmony-dev@incubator.apache.org Subject: Re: [jira] Commented: (HARMONY-499) Java 5 Enhancement: java.net.HttpURLConnection should send request head with a connection-field of "Keep-Alive" References: <7124894.1149140250844.JavaMail.jira@brutus> In-Reply-To: <7124894.1149140250844.JavaMail.jira@brutus> X-MIMETrack: Itemize by SMTP Server on D23M0011/23/M/IBM(Release 6.5.5HF262 | April 5, 2006) at 01/06/2006 16:00:20, Serialize by Router on D23M0011/23/M/IBM(Release 6.5.5HF262 | April 5, 2006) at 01/06/2006 16:00:28, Serialize complete at 01/06/2006 16:00:28 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=UTF-8; format=flowed X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Alexander Kleymenov (JIRA) wrote: > [ http://issues.apache.org/jira/browse/HARMONY-499?page=comments#action_12414202 ] > > Alexander Kleymenov commented on HARMONY-499: > --------------------------------------------- > > Hello, > > I am working on HttpsURLConnection and noticed this JIRA report. > > I went through the Java 5 Enhancements for Networking and could not found any statements for HttpURLConnection. > > Then I examined the HTTP protocol specification > (RFC 2616 can be found at http://www.ietf.org/rfc/rfc2616.txt). > It says: > "HTTP/1.1 applications that do not support persistent connections MUST > include the "close" connection option in every message." > > The source file of HttpURLConnection implementation does not seem to support persistent connections. > > So recent changes made to the class > > org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection > > ("Connection: close" --> "Connection: Keep-Alive") seem to be incorrect without implementation of support for persistent connections. > Alexander, Let Richard speak for himself, but I agree with you that we should provide the support for persistent connections, as the spec hints: " Each HttpURLConnection instance is used to make a single request but the underlying network connection to the HTTP server may be transparently shared by other instances. Calling the close() methods on the InputStream or OutputStream of an HttpURLConnection after a request may free network resources associated with this instance but has no effect on any shared persistent connection. Calling the disconnect() method may close the underlying socket if a persistent connection is otherwise idle at that time." My idea is some internal socket pool should be maintained, and this mechanism should can be shared between HttpURLConnection and HttpsURLConnection, do you have any suggestions on this issue? > Thanks, > Alexander > > >> Java 5 Enhancement: java.net.HttpURLConnection should send request head with a connection-field of "Keep-Alive" >> --------------------------------------------------------------------------------------------------------------- >> >> Key: HARMONY-499 >> URL: http://issues.apache.org/jira/browse/HARMONY-499 >> Project: Harmony >> Type: Improvement >> > > >> Components: Classlib >> Reporter: Richard Liang >> Assignee: Tim Ellison >> Priority: Minor >> Attachments: luni.src.net.diff >> >> Hello, >> java.net.HttpURLConnection should send request head with a default connection-field of "Keep-Alive". Currently in its implementation, it sends a connection-field of "close", but does not close its own socket after connection, which may cause low performance and strange behavior on some servers. >> Best regards, >> Richard >> > > -- Paulex Yang China Software Development Lab IBM --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org For additional commands, e-mail: harmony-dev-help@incubator.apache.org