summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2009-07-09 17:51:54 +0000
committerAdam Kocoloski <kocolosk@apache.org>2009-07-09 17:51:54 +0000
commit2f18f60fea5a1de6a221c6124038399c47d42aa2 (patch)
tree811682eae57fb9168c0dffb80b50b2bfc115594a /src
parent02cb712e18ee5647517fc38b6aa0c188af090894 (diff)
fix and test for scrambling of large inline attachments
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@792618 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/couchdb/couch_doc.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/couchdb/couch_doc.erl b/src/couchdb/couch_doc.erl
index 6c9a119c..22fc38b8 100644
--- a/src/couchdb/couch_doc.erl
+++ b/src/couchdb/couch_doc.erl
@@ -269,7 +269,7 @@ bin_size({_Fd, _Sp, Len}) ->
bin_to_binary(Bin) when is_binary(Bin) ->
Bin;
bin_to_binary({Fd, Sp, _Len}) ->
- couch_stream:foldl(Fd, Sp, fun(Bin, Acc) -> [Bin|Acc] end, []).
+ lists:reverse(couch_stream:foldl(Fd, Sp, fun(Bin,Acc) -> [Bin|Acc] end, [])).
get_validate_doc_fun(#doc{body={Props}}) ->
Lang = proplists:get_value(<<"language">>, Props, <<"javascript">>),