Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 82443 invoked from network); 17 Feb 2009 09:44:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Feb 2009 09:44:05 -0000 Received: (qmail 98034 invoked by uid 500); 17 Feb 2009 09:44:04 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 97727 invoked by uid 500); 17 Feb 2009 09:44:03 -0000 Mailing-List: contact dev-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list dev@harmony.apache.org Received: (qmail 97716 invoked by uid 99); 17 Feb 2009 09:44:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Feb 2009 01:44:03 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of xu.regis@gmail.com designates 74.125.92.148 as permitted sender) Received: from [74.125.92.148] (HELO qw-out-1920.google.com) (74.125.92.148) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Feb 2009 09:43:55 +0000 Received: by qw-out-1920.google.com with SMTP id 4so648186qwk.24 for ; Tue, 17 Feb 2009 01:43:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=cyJpBn7snAdQups9CxfmQEPS4JZIKKkUFlZnXTFQz8I=; b=Kk7BjIEc0n4HOJCEZDq4kNRyb2AHlfbz2TgeP8LUt5CDT5o5XyChjtvZHpQJ90U3Fu aczTAEy7sNko/3NOpIZ7FnbC90xhf95tE1p/IIzbnG56NzSy4fyIHdQXL/Y9+lh4X10u ozcFM/wtBX3pfDNGUoFF+Af2TdLjxbHeQw6S4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=lmweZOfN+5uQkwwERR1juoRQFs1PYfyHIpOFcACsAodkLoIawRHIS2dtSUS+fC/84x tzHj7RmPwaC+bcg0o//yxrEdCFDMAkMeOAB45wXIGtZhxft9FS5nOEWim05Fqf8YoQmi Fd2xDrEXYMi+CTm/yo90vW+JcCVZ71kzDPmVs= Received: by 10.224.74.74 with SMTP id t10mr9726987qaj.332.1234863814935; Tue, 17 Feb 2009 01:43:34 -0800 (PST) Received: from ?9.123.229.230? ([220.248.0.145]) by mx.google.com with ESMTPS id 5sm959785qwh.59.2009.02.17.01.43.32 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 17 Feb 2009 01:43:34 -0800 (PST) Message-ID: <499A86BE.4050000@gmail.com> Date: Tue, 17 Feb 2009 17:43:26 +0800 From: Regis User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: dev@harmony.apache.org Subject: Re: [classlib][luni]httpclient code in HttpConnection.java References: <5948b71e0902162346s654a3a03xe457dfcc24ffb042@mail.gmail.com> In-Reply-To: <5948b71e0902162346s654a3a03xe457dfcc24ffb042@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Charles Lee wrote: > Hi guys, > > We are using some code from the jakarta common's HttpConnection.java in our > org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.java. >>>From the comment above the code, we are using a quite old revision r480424. > > In the method isStale(), we have used inputStream.mark(1). But from the > spec, we have "The general contract of mark is that, if the method > markSupported returns true, the stream somehow remembers all the bytes read > after the call to mark and stands ready to supply those same bytes again if > and whenever the method reset is called. However, the stream is not required > to remember any data at all if more than readlimit bytes are read from the > stream before reset is called. " So I guess we should test markSupported() > first. > > 1. Should we update the code to the latest revision? does the latest code work well with harmony? > 2. Should we modify the code ourselves and get rid of the jakarta commons? If it's easy to fix it by ourselves, I incline to get rid of the jakarka commons. > > Any idea? > -- Best Regards, Regis.