From a7b43366ea1706be808961536ec3c1abb192dba0 Mon Sep 17 00:00:00 2001 From: Paul Joseph Davis Date: Sat, 6 Nov 2010 00:12:31 +0000 Subject: Fixed an error spotted by Filipe. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1031887 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_httpd_proxy.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/couchdb/couch_httpd_proxy.erl b/src/couchdb/couch_httpd_proxy.erl index d12e0c87..e4b94f22 100644 --- a/src/couchdb/couch_httpd_proxy.erl +++ b/src/couchdb/couch_httpd_proxy.erl @@ -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. -- cgit v1.2.3