httpfile: fix range requests

byte ranges use closed intervals (inclusive first
and last byte offsets)
This commit is contained in:
cinap_lenrek 2013-01-31 22:48:56 +01:00
parent 5a93a2a983
commit e53ece53ed

View file

@ -265,7 +265,7 @@ getrange(Block *b)
"Accept-Encoding:\r\n"
"Range: bytes=%lld-%lld\r\n"
"\r\n",
get, host, b->off, b->off+b->len);
get, host, b->off, b->off+b->len-1);
Bflush(&netbio);
status = readhttphdr(&netbio, nil);