Support content-range from non-compliant server
See GH-509
This commit is contained in:
@@ -101,6 +101,17 @@ void HttpHeaderTest::testGetRange()
|
||||
CPPUNIT_ASSERT_EQUAL((int64_t)0, range.endByte);
|
||||
CPPUNIT_ASSERT_EQUAL((int64_t)0, range.entityLength);
|
||||
}
|
||||
{
|
||||
// Support for non-compliant server
|
||||
HttpHeader httpHeader;
|
||||
httpHeader.put(HttpHeader::CONTENT_RANGE, "bytes=0-1023/1024");
|
||||
|
||||
Range range = httpHeader.getRange();
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL((int64_t)0, range.startByte);
|
||||
CPPUNIT_ASSERT_EQUAL((int64_t)1023, range.endByte);
|
||||
CPPUNIT_ASSERT_EQUAL((int64_t)1024, range.entityLength);
|
||||
}
|
||||
{
|
||||
HttpHeader httpHeader;
|
||||
httpHeader.put(HttpHeader::CONTENT_RANGE, "bytes 0-/3");
|
||||
|
||||
Reference in New Issue
Block a user