Re: [core-dev] BUG: dowloading from partial sources broken

Sumeet Thadani <[email protected]> Mon, 14 Jun 2004 11:43:07 -0400
Newsgroups gmane.network.gnutella.limewire.core.devel
Message-ID <[email protected]>
Thats the part I am confused about. If I request a range from you 10-20, 
we have the following cases:

1. You don't have that range, you return 503 and return the ranges you 
do have -- in this case the code works Note that in this case if you 
send me a range-available with the range I just requsted off you, I 
should think you are buggy.
2. You have range 15-18, in this case you send the data and the other 
ranges you have -- in this case the code works fine (we are checking if 
the requested range is a subrage of the partial ranges)
3. You have ranges 9-21. What should you do? I think you should write 
the data and there is no need to send the partial ranges -- this case is 
identical to a 200 OK. You were able to satisfy the request. Available 
ranges need be send only if you are not able to satisfy the range, 
specially becase they are a moving target.
4. You have range 15 - 25 similar to the above case -- write 15 - 20 and 
that's it.

Currently the code does not check the status of the http reply, which it 
should.

Zlatin is also looking into this, and is seeing that LimeWire uploaders 
are sending 503 messages with range-available ranges which are 
super-ranges of the requested range -- perhaps there is a bug in the 
uploader as well (as in case 1 above).

Thanks,

Sumeet


Sam Berlin wrote:

>The problem is that there is no check for "the uploader gave us a range not available", atleast not that I saw in that code.  A valid partial response (206) is going to trigger that failure code.
>
>Thanks,
> Sam
>
>-----Original Message-----
>From: [email protected]
>[mailto:[email protected]]On Behalf Of Sumeet Thadani
>Sent: Monday, June 14, 2004 10:14 AM
>To: [email protected]
>Subject: Re: [core-dev] BUG: dowloading from partial sources broken
>
>
>I don't see the problem. The scenario is we requested a range, the 
>uploader gave us a a range not available, which was bigger (and included 
>the range we asked for), and we throw and exception.
>
>If the uploader had the range, why did it give us partial ranges, 
>instead of giving us the data.
>
>Thanks,
>
>Sumeet
>
>Sam Berlin wrote:
>
>  
>
>>Yeah ...  apparently it's been in there since version 3.9.6.   (Revision 1.198 of HTTPDownloader.)  :(
>>
>>Thanks,
>>Sam
>>
>>-----Original Message-----
>>From: [email protected]
>>[mailto:[email protected]]On Behalf Of Greg Bildson
>>Sent: Saturday, June 12, 2004 1:45 PM
>>To: [email protected]
>>Subject: RE: [core-dev] BUG: dowloading from partial sources broken
>>
>>
>>That would probably explain why I saw no partial file sharing today.
>>
>>Thanks
>>-greg
>>---------- Original Message ----------------------------------
>>From: "Sam Berlin" <[email protected]>
>>Reply-To: [email protected]
>>Date: Sat, 12 Jun 2004 13:14:32 -0400
>>
>> 
>>
>>    
>>
>>>Hi Gregorio,
>>>
>>>I seem to remember that this was added to protect against uploaders who tell us to go away, but then give us a X-Available-Ranges with ranges that contain what we just asked for.  If that's the case, then it would seem that the initial "protect against uploaders who tell us to go away" wasn't actually included, so now we're just backing off from anyone who has a partial range of what we request, which would indeed break downloading from partial sources.
>>>
>>>I have opened an issue for this, at http://www.limewire.org/jira/browse/CORE-1 .
>>>
>>>Thanks,
>>>Sam
>>>
>>>-----Original Message-----
>>>From: [email protected]
>>>[mailto:[email protected]]On Behalf Of Gregorio Roper
>>>Sent: Saturday, June 12, 2004 5:25 AM
>>>To: [email protected]
>>>Subject: [core-dev] BUG: dowloading from partial sources broken
>>>
>>>
>>>Lines 1126ff in the HTTPDownloader.java seem to be responsible for this problem:
>>>
>>>       //OK. All the ranges have been collated now. See if the uploader is up
>>>       //to mischief
>>>       Iterator iter = availableRanges.getAllIntervals();
>>>       while(iter.hasNext()) {
>>>           Interval next = (Interval)iter.next();
>>>           if(_requestedInterval.isSubrange(next))
>>>               throw new ProblemReadingHeaderException("Bad ranges sent");
>>>       }
>>>
>>>
>>>I'm not quite sure what these lines were supposed to do, but what they do is check whether 
>>>the requested interval is available and throw a PRHE if this range actually is available.
>>>
>>>mfg
>>>gregorio
>>>_______________________________________________
>>>core-dev mailing list
>>>[email protected]
>>>http://www.limewire.org/mailman/listinfo/core-dev
>>>
>>>
>>>_______________________________________________
>>>core-dev mailing list
>>>[email protected]
>>>http://www.limewire.org/mailman/listinfo/core-dev
>>>
>>>   
>>>
>>>      
>>>
>>_______________________________________________
>>core-dev mailing list
>>[email protected]
>>http://www.limewire.org/mailman/listinfo/core-dev
>>
>>
>>_______________________________________________
>>core-dev mailing list
>>[email protected]
>>http://www.limewire.org/mailman/listinfo/core-dev
>>
>>.
>>
>> 
>>
>>    
>>
>
>
>_______________________________________________
>core-dev mailing list
>[email protected]
>http://www.limewire.org/mailman/listinfo/core-dev
>
>
>_______________________________________________
>core-dev mailing list
>[email protected]
>http://www.limewire.org/mailman/listinfo/core-dev
>
>.
>
>  
>


_______________________________________________
core-dev mailing list
[email protected]
http://www.limewire.org/mailman/listinfo/core-dev