mirror of
https://github.com/aria2/aria2.git
synced 2025-04-04 21:17:41 +03:00
Dont' return SharedHandle from HttpHeader::getRange()
This commit is contained in:
parent
492d6d1eeb
commit
e34d0e7ffa
10 changed files with 80 additions and 99 deletions
|
@ -649,7 +649,7 @@ void HttpRequestTest::testIsRangeSatisfied()
|
|||
httpRequest.setSegment(segment);
|
||||
httpRequest.setFileEntry(fileEntry);
|
||||
|
||||
SharedHandle<Range> range(new Range());
|
||||
Range range;
|
||||
|
||||
CPPUNIT_ASSERT(httpRequest.isRangeSatisfied(range));
|
||||
|
||||
|
@ -661,7 +661,7 @@ void HttpRequestTest::testIsRangeSatisfied()
|
|||
|
||||
uint64_t entityLength = segment->getSegmentLength()*10;
|
||||
|
||||
range.reset(new Range(segment->getPosition(), 0, entityLength));
|
||||
range = Range(segment->getPosition(), 0, entityLength);
|
||||
|
||||
CPPUNIT_ASSERT(httpRequest.isRangeSatisfied(range));
|
||||
|
||||
|
@ -677,14 +677,14 @@ void HttpRequestTest::testIsRangeSatisfied()
|
|||
|
||||
CPPUNIT_ASSERT(!httpRequest.isRangeSatisfied(range));
|
||||
|
||||
range.reset(new Range(segment->getPosition(),
|
||||
segment->getPosition()+segment->getLength()-1,
|
||||
entityLength));
|
||||
range = Range(segment->getPosition(),
|
||||
segment->getPosition()+segment->getLength()-1,
|
||||
entityLength);
|
||||
|
||||
CPPUNIT_ASSERT(httpRequest.isRangeSatisfied(range));
|
||||
|
||||
range.reset(new Range(0, segment->getPosition()+segment->getLength()-1,
|
||||
entityLength));
|
||||
range = Range(0, segment->getPosition()+segment->getLength()-1,
|
||||
entityLength);
|
||||
|
||||
CPPUNIT_ASSERT(!httpRequest.isRangeSatisfied(range));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue