summaryrefslogtreecommitdiff
path: root/src/couchdb
diff options
context:
space:
mode:
Diffstat (limited to 'src/couchdb')
-rw-r--r--src/couchdb/couch_httpd_db.erl7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/couchdb/couch_httpd_db.erl b/src/couchdb/couch_httpd_db.erl
index bd83cd87..4fea824b 100644
--- a/src/couchdb/couch_httpd_db.erl
+++ b/src/couchdb/couch_httpd_db.erl
@@ -876,8 +876,11 @@ db_attachment_req(#httpd{method='GET'}=Req, Db, DocId, FileNameParts) ->
{"Cache-Control", "must-revalidate"},
{"Content-Type", binary_to_list(Type)}
], integer_to_list(Len)),
- couch_doc:att_foldl(Att,
- fun(BinSegment, _) -> send(Resp, BinSegment) end,[])
+ couch_doc:att_foldl(
+ Att,
+ fun(BinSegment, _) -> send(Resp, BinSegment) end,
+ {ok, Resp} % Seed in case of 0 byte attachment.
+ )
end)
end;