summaryrefslogtreecommitdiff
path: root/src/couchdb
diff options
context:
space:
mode:
authorPaul Joseph Davis <davisp@apache.org>2010-11-06 00:12:31 +0000
committerPaul Joseph Davis <davisp@apache.org>2010-11-06 00:12:31 +0000
commita7b43366ea1706be808961536ec3c1abb192dba0 (patch)
tree8d4ae972d4df3557e4b45bcda0f32f853135180a /src/couchdb
parent96aee7d6b6a94040787d935dc14d4ebda6981dcf (diff)
Fixed an error spotted by Filipe.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1031887 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb')
-rw-r--r--src/couchdb/couch_httpd_proxy.erl8
1 files changed, 4 insertions, 4 deletions
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.