couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject [20/25] couch commit: updated refs/heads/master to 92598cd
Date Thu, 15 Oct 2015 16:35:54 GMT
Fix indentation


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

Branch: refs/heads/master
Commit: b6cccd93282c4c134a5a91e2ed43a231f14e98ce
Parents: 0790202
Author: ILYA Khlopotov <iilyak@ca.ibm.com>
Authored: Fri Nov 28 13:36:51 2014 -0800
Committer: ILYA Khlopotov <iilyak@ca.ibm.com>
Committed: Wed May 6 06:55:59 2015 -0700

----------------------------------------------------------------------
 src/couch_doc.erl | 41 ++++++++++++++++++++---------------------
 1 file changed, 20 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/b6cccd93/src/couch_doc.erl
----------------------------------------------------------------------
diff --git a/src/couch_doc.erl b/src/couch_doc.erl
index 3669865..fd12283 100644
--- a/src/couch_doc.erl
+++ b/src/couch_doc.erl
@@ -355,27 +355,26 @@ len_doc_to_multi_part_stream(Boundary, JsonBytes, Atts, SendEncodedAtts)
->
     AttsToInclude = lists:filter(fun(Att) -> not couch_att:is_stub(Att) end, Atts),
     AttsDecoded = decode_attributes(AttsToInclude, SendEncodedAtts),
     AttsSize = lists:foldl(fun({_Att, Name, Len, Type, Encoding}, AccAttsSize) ->
-                AccAttsSize +
-                4 + % "\r\n\r\n"
-                length(integer_to_list(Len)) +
-                Len +
-                4 + % "\r\n--"
-                size(Boundary) +
-
-                % attachment headers
-                % (the length of the Content-Length has already been set)
-                size(Name) +
-                size(Type) +
-                length("\r\nContent-Disposition: attachment; filename=\"\"") +
-                length("\r\nContent-Type: ") +
-                length("\r\nContent-Length: ") +
-                case Encoding of
-                identity ->
-                    0;
-                 _ ->
-                    length(atom_to_list(Encoding)) +
-                    length("\r\nContent-Encoding: ")
-                end
+          AccAttsSize +
+          4 + % "\r\n\r\n"
+          length(integer_to_list(Len)) +
+          Len +
+          4 + % "\r\n--"
+          size(Boundary) +
+          % attachment headers
+          % (the length of the Content-Length has already been set)
+          size(Name) +
+          size(Type) +
+          length("\r\nContent-Disposition: attachment; filename=\"\"") +
+          length("\r\nContent-Type: ") +
+          length("\r\nContent-Length: ") +
+          case Encoding of
+          identity ->
+              0;
+           _ ->
+              length(atom_to_list(Encoding)) +
+              length("\r\nContent-Encoding: ")
+          end
         end, 0, AttsDecoded),
     if AttsSize == 0 ->
         {<<"application/json">>, iolist_size(JsonBytes)};


Mime
View raw message