You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ko...@apache.org on 2009/05/29 06:44:27 UTC
svn commit: r779839 - /couchdb/trunk/src/couchdb/couch_db.erl
Author: kocolosk
Date: Fri May 29 04:44:27 2009
New Revision: 779839
URL: http://svn.apache.org/viewvc?rev=779839&view=rev
Log:
misapplied Antony's workaround for extra bytes in r775724
Modified:
couchdb/trunk/src/couchdb/couch_db.erl
Modified: couchdb/trunk/src/couchdb/couch_db.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_db.erl?rev=779839&r1=779838&r2=779839&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_db.erl (original)
+++ couchdb/trunk/src/couchdb/couch_db.erl Fri May 29 04:44:27 2009
@@ -613,8 +613,9 @@
ok;
write_streamed_attachment(Stream, F, LenLeft) ->
Bin = F(),
- ok = couch_stream:write(Stream, check_bin_length(LenLeft, Bin)),
- write_streamed_attachment(Stream, F, LenLeft - size(Bin)).
+ TruncatedBin = check_bin_length(LenLeft, Bin),
+ ok = couch_stream:write(Stream, TruncatedBin),
+ write_streamed_attachment(Stream, F, LenLeft - size(TruncatedBin)).
%% on rare occasions ibrowse seems to process a chunked response incorrectly
%% and include an extra "\r" in the last chunk. This code ensures that we