Skip to content

Commit 5681fc1

Browse files
committed
[api] Emit end event when done proxying
1 parent a3cb527 commit 5681fc1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/node-http-proxy.js

+3
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,9 @@ HttpProxy.prototype.proxyRequest = function (req, res, port, host, buffer) {
359359
if (!errState) {
360360
reverseProxy.removeListener('error', proxyError);
361361
res.end();
362+
363+
// Emit the `end` event now that we have completed proxying
364+
self.emit('end', req, res);
362365
}
363366
});
364367
});

0 commit comments

Comments
 (0)