From 5e2db72572299ac4a03c762ab2ee87f53c42b518 Mon Sep 17 00:00:00 2001 From: "Damien F. Katz" Date: Fri, 29 May 2009 03:29:25 +0000 Subject: Fix and test for COUCHDB-366, uploading large attachments causes 500 error. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@779824 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_stream.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/couchdb/couch_stream.erl b/src/couchdb/couch_stream.erl index 1f12e632..ed7ca01e 100644 --- a/src/couchdb/couch_stream.erl +++ b/src/couchdb/couch_stream.erl @@ -102,7 +102,7 @@ handle_call({write, Bin}, _From, Stream) -> buffer_list = Buffer, max_buffer = Max} = Stream, if BinSize + BufferLen > Max -> - {ok, Pos} = couch_file:append_binary(Fd, lists:reverse(Buffer, Bin)), + {ok, Pos} = couch_file:append_binary(Fd, lists:reverse(Buffer, [Bin])), {reply, ok, Stream#stream{ written_len=WrittenLen + BufferLen + BinSize, written_pointers=[Pos|Written], -- cgit v1.2.3