From 086eec7b899f566d72fcf0b3effc070e591ee37e Mon Sep 17 00:00:00 2001 From: Robert Newson Date: Tue, 17 Aug 2010 20:38:59 +0000 Subject: fix badmatch when fetching zero byte attachments. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@986476 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_httpd_db.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/couchdb/couch_httpd_db.erl b/src/couchdb/couch_httpd_db.erl index 54b01600..3c7e57c4 100644 --- a/src/couchdb/couch_httpd_db.erl +++ b/src/couchdb/couch_httpd_db.erl @@ -922,11 +922,11 @@ db_attachment_req(#httpd{method='GET'}=Req, Db, DocId, FileNameParts) -> case Len of undefined -> {ok, Resp} = start_chunked_response(Req, 200, Headers), - AttFun(Att, fun(Seg, _) -> send_chunk(Resp, Seg) end, ok), + AttFun(Att, fun(Seg, _) -> send_chunk(Resp, Seg) end, {ok, Resp}), last_chunk(Resp); _ -> {ok, Resp} = start_response_length(Req, 200, Headers, Len), - AttFun(Att, fun(Seg, _) -> send(Resp, Seg) end, ok) + AttFun(Att, fun(Seg, _) -> send(Resp, Seg) end, {ok, Resp}) end end ) -- cgit v1.2.3