harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Wu <wuyue...@gmail.com>
Subject Re: [classlib][luni]httpclient code in HttpConnection.java
Date Tue, 17 Feb 2009 08:03:09 GMT
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 <littlee1032@gmail.com> 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

Mime
View raw message