summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDamien F. Katz <damien@apache.org>2009-05-29 03:29:25 +0000
committerDamien F. Katz <damien@apache.org>2009-05-29 03:29:25 +0000
commit5e2db72572299ac4a03c762ab2ee87f53c42b518 (patch)
tree58077adaa225a4c750d6f689c2ee36537e2304af /src
parent495cf53ca4a1139c724012d63c4e0cf08299266b (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/couchdb/couch_stream.erl2
1 files changed, 1 insertions, 1 deletions
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],