couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From beno...@apache.org
Subject couch commit: updated refs/heads/1994-merge-rcouch to 9f6dbd6
Date Sun, 13 Jul 2014 13:27:57 GMT
Repository: couchdb-couch
Updated Branches:
  refs/heads/1994-merge-rcouch 7ad4bc655 -> 9f6dbd66a


do not depends on mochiweb.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/9f6dbd66
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/9f6dbd66
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/9f6dbd66

Branch: refs/heads/1994-merge-rcouch
Commit: 9f6dbd66aac563747136ffdf31575f1234fe0260
Parents: 7ad4bc6
Author: benoitc <bchesneau@gmail.com>
Authored: Tue Jul 8 11:11:57 2014 +0200
Committer: benoitc <bchesneau@gmail.com>
Committed: Sun Jul 13 15:04:50 2014 +0200

----------------------------------------------------------------------
 src/couch_db.erl | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/9f6dbd66/src/couch_db.erl
----------------------------------------------------------------------
diff --git a/src/couch_db.erl b/src/couch_db.erl
index a852cae..c134f45 100644
--- a/src/couch_db.erl
+++ b/src/couch_db.erl
@@ -938,16 +938,12 @@ flush_att(Fd, #att{data=Fun,att_len=undefined}=Att) when is_function(Fun)
->
             % WriterFun({0, _Footers}, State)
             % Called with Length == 0 on the last time.
             % WriterFun returns NewState.
-            fun({0, Footers}, _) ->
-                F = mochiweb_headers:from_binary(Footers),
-                case mochiweb_headers:get_value("Content-MD5", F) of
-                undefined ->
-                    ok;
-                Md5 ->
-                    {md5, base64:decode(Md5)}
-                end;
-            ({_Length, Chunk}, _) ->
-                couch_stream:write(OutputStream, Chunk)
+            fun({_Length, Chunk}, _) ->
+                couch_stream:write(OutputStream, Chunk);
+            (undefined, _) ->
+                ok;
+            (Md5, _) ->
+                {md5, base64:decode(Md5)}
             end, ok)
     end);
 


Mime
View raw message