couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject svn commit: r1031887 - /couchdb/trunk/src/couchdb/couch_httpd_proxy.erl
Date Sat, 06 Nov 2010 00:12:31 GMT
Author: davisp
Date: Sat Nov  6 00:12:31 2010
New Revision: 1031887

URL: http://svn.apache.org/viewvc?rev=1031887&view=rev
Log:
Fixed an error spotted by Filipe.


Modified:
    couchdb/trunk/src/couchdb/couch_httpd_proxy.erl

Modified: couchdb/trunk/src/couchdb/couch_httpd_proxy.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_httpd_proxy.erl?rev=1031887&r1=1031886&r2=1031887&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_httpd_proxy.erl (original)
+++ couchdb/trunk/src/couchdb/couch_httpd_proxy.erl Sat Nov  6 00:12:31 2010
@@ -294,12 +294,12 @@ stream_response(Req, ProxyDest, ReqId) -
 
 stream_chunked_response(Req, ReqId, Resp) ->
     receive
+        {ibrowse_async_response, ReqId, {error, Reason}} ->
+            throw({error, Reason});
         {ibrowse_async_response, ReqId, Chunk} ->
             couch_httpd:send_chunk(Resp, Chunk),
             ibrowse:stream_next(ReqId),
             stream_chunked_response(Req, ReqId, Resp);
-        {ibrowse_async_response, ReqId, {error, Reason}} ->
-            throw({error, Reason});
         {ibrowse_async_response_end, ReqId} ->
             couch_httpd:last_chunk(Resp)
     end.
@@ -307,12 +307,12 @@ stream_chunked_response(Req, ReqId, Resp
 
 stream_length_response(Req, ReqId, Resp) ->
     receive
+        {ibrowse_async_response, ReqId, {error, Reason}} ->
+            throw({error, Reason});
         {ibrowse_async_response, ReqId, Chunk} ->
             couch_httpd:send(Resp, Chunk),
             ibrowse:stream_next(ReqId),
             stream_length_response(Req, ReqId, Resp);
-        {ibrowse_async_response, {error, Reason}} ->
-            throw({error, Reason});
         {ibrowse_async_response_end, ReqId} ->
             ok
     end.



Mime
View raw message