couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kocol...@apache.org
Subject svn commit: r779839 - /couchdb/trunk/src/couchdb/couch_db.erl
Date Fri, 29 May 2009 04:44:27 GMT
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 



Mime
View raw message