Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 58525 invoked from network); 17 Feb 2009 08:03:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Feb 2009 08:03:38 -0000 Received: (qmail 11380 invoked by uid 500); 17 Feb 2009 08:03:36 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 11345 invoked by uid 500); 17 Feb 2009 08:03:36 -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 11334 invoked by uid 99); 17 Feb 2009 08:03:36 -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 00:03:36 -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 wuyuehao@gmail.com designates 209.85.200.171 as permitted sender) Received: from [209.85.200.171] (HELO wf-out-1314.google.com) (209.85.200.171) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Feb 2009 08:03:29 +0000 Received: by wf-out-1314.google.com with SMTP id 28so2683476wfc.24 for ; Tue, 17 Feb 2009 00:03:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=Xr3PW7uLf7P5MhdAZkS+TCyySzj+U2istnTX8HWAias=; b=EIBIbcFcac3BMl4o8p3N2Tu33ng6PQ41w8rtCs9oeevAcjnp9EheSTEHpoAahK9nF0 gZEp0R2uJ0DgpmDHA4y26Ko7AkbQUXBG9CeFBpS3lAlwASndz8PFxhwOFE5AmpkegSr1 vz1EkyXcxYYsyccmBv59fIpf/yb/3Yod5NbsU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=Plx0MEI9otPBhnMuPFFpi0BJ7USbIj2rbbl21o8keGyy276/k9ECzNIwTpqDafv9G7 9oStO0o1tG2UfnN3mYcRmyCVygvccaGuYNypULr/hwljkBcyf7eM138p+LTGUfJWfx7m pyqh9AxDh311F6dHydq4Cr5OCGxSH4ddN8KgM= MIME-Version: 1.0 Received: by 10.142.157.6 with SMTP id f6mr1270240wfe.248.1234857789753; Tue, 17 Feb 2009 00:03:09 -0800 (PST) In-Reply-To: <5948b71e0902162346s654a3a03xe457dfcc24ffb042@mail.gmail.com> References: <5948b71e0902162346s654a3a03xe457dfcc24ffb042@mail.gmail.com> Date: Tue, 17 Feb 2009 16:03:09 +0800 Message-ID: <211709bc0902170003mf4d69cdyf6439489518e9461@mail.gmail.com> Subject: Re: [classlib][luni]httpclient code in HttpConnection.java From: Tony Wu To: dev@harmony.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I think we should update to a lastest stable version, 480424 is tooooo old, probably 2 years ago? On Tue, Feb 17, 2009 at 3:46 PM, 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? > 2. Should we modify the code ourselves and get rid of the jakarta commons? > > Any idea? > > -- > Yours sincerely, > Charles Lee > China Software Development Lab, IBM > -- Tony Wu China Software Development Lab, IBM