summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Newson <rnewson@apache.org>2010-08-24 18:42:15 +0000
committerRobert Newson <rnewson@apache.org>2010-08-24 18:42:15 +0000
commit808d2b79f3b1075f4480e2d628d737f4ac82aba2 (patch)
tree85aadff97913bdfe3baed387b71b937a777e91fa /src
parent08f170f241e3ee85b4d10fb0ef47ffb2f8158832 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/couchdb/couch_httpd_db.erl2
1 files changed, 1 insertions, 1 deletions
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};
_ ->