mirror of https://github.com/kiwix/libkiwix.git
Byte ranges are inclusive
The second component of a byte range, if present, designates the index of the last byte to be included in the partial response.
This commit is contained in:
parent
2bf35f1651
commit
1a99bacfe3
|
@ -43,7 +43,7 @@ int get_range_len(const kiwix::Entry& entry, RequestContext::ByteRange range)
|
|||
{
|
||||
return range.second == -1
|
||||
? entry.getSize() - range.first
|
||||
: range.second - range.first;
|
||||
: range.second - range.first + 1;
|
||||
}
|
||||
|
||||
} // unnamed namespace
|
||||
|
|
Loading…
Reference in New Issue