Skip to content

Commit

Permalink
[feature] add buffer support
Browse files Browse the repository at this point in the history
  • Loading branch information
yawnt committed Oct 26, 2013
1 parent a1b25a1 commit e3f8d5f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/http-proxy/passes/web-incoming.js
Expand Up @@ -106,6 +106,7 @@ web_o = Object.keys(web_o).map(function(pass) {

// Error Handler
proxyReq.on('error', function(err){
if(options.buffer) { options.buffer.destroy(); }
if (clb) {
clb(err);
} else {
Expand All @@ -123,6 +124,10 @@ web_o = Object.keys(web_o).map(function(pass) {
proxyRes.pipe(res);
});

if(options.buffer) {
options.buffer.resume();
}

//proxyReq.end();
}

Expand Down

0 comments on commit e3f8d5f

Please sign in to comment.