shithub: riscv

Download patch

ref: e53ece53eda0adea1f586aae832d5e7391f91801
parent: 5a93a2a9837e98ebbce8de81f8d933d213134e8d
author: cinap_lenrek <[email protected]>
date: Thu Jan 31 17:48:56 EST 2013

httpfile: fix range requests

byte ranges use closed intervals (inclusive first
and last byte offsets)

--- a/sys/src/cmd/ip/httpfile.c
+++ b/sys/src/cmd/ip/httpfile.c
@@ -265,7 +265,7 @@
 		"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);