You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2010/08/17 22:39:00 UTC
svn commit: r986476 - /couchdb/trunk/src/couchdb/couch_httpd_db.erl
Author: rnewson
Date: Tue Aug 17 20:38:59 2010
New Revision: 986476
URL: http://svn.apache.org/viewvc?rev=986476&view=rev
Log:
fix badmatch when fetching zero byte attachments.
Modified:
couchdb/trunk/src/couchdb/couch_httpd_db.erl
Modified: couchdb/trunk/src/couchdb/couch_httpd_db.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_httpd_db.erl?rev=986476&r1=986475&r2=986476&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_httpd_db.erl (original)
+++ couchdb/trunk/src/couchdb/couch_httpd_db.erl Tue Aug 17 20:38:59 2010
@@ -922,11 +922,11 @@ db_attachment_req(#httpd{method='GET'}=R
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
)