couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject svn commit: r986476 - /couchdb/trunk/src/couchdb/couch_httpd_db.erl
Date Tue, 17 Aug 2010 20:39:00 GMT
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
         )



Mime
View raw message