From 808d2b79f3b1075f4480e2d628d737f4ac82aba2 Mon Sep 17 00:00:00 2001 From: Robert Newson Date: Tue, 24 Aug 2010 18:42:15 +0000 Subject: correct fencepost error for last bytes range request. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@988651 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_httpd_db.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/couchdb/couch_httpd_db.erl') diff --git a/src/couchdb/couch_httpd_db.erl b/src/couchdb/couch_httpd_db.erl index 8ee6fc3f..0479c9c1 100644 --- a/src/couchdb/couch_httpd_db.erl +++ b/src/couchdb/couch_httpd_db.erl @@ -1096,7 +1096,7 @@ parse_ranges([], _Len, Acc) -> parse_ranges([{From,To}|Rest], Len, Acc) -> {From1, To1} = case {From, To} of {none, To} -> - {Len - To - 1, Len - 1}; + {Len - To, Len - 1}; {From, none} -> {From, Len - 1}; _ -> -- cgit v1.2.3