Skip to content

Commit e3f8d5f

Browse files
committed
[feature] add buffer support
1 parent a1b25a1 commit e3f8d5f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: lib/http-proxy/passes/web-incoming.js

+5
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ web_o = Object.keys(web_o).map(function(pass) {
106106

107107
// Error Handler
108108
proxyReq.on('error', function(err){
109+
if(options.buffer) { options.buffer.destroy(); }
109110
if (clb) {
110111
clb(err);
111112
} else {
@@ -123,6 +124,10 @@ web_o = Object.keys(web_o).map(function(pass) {
123124
proxyRes.pipe(res);
124125
});
125126

127+
if(options.buffer) {
128+
options.buffer.resume();
129+
}
130+
126131
//proxyReq.end();
127132
}
128133

0 commit comments

Comments
 (0)