diff --git a/lib/node-http-proxy.js b/lib/node-http-proxy.js index 3af5990..bff066b 100644 --- a/lib/node-http-proxy.js +++ b/lib/node-http-proxy.js @@ -359,6 +359,9 @@ HttpProxy.prototype.proxyRequest = function (req, res, port, host, buffer) { if (!errState) { reverseProxy.removeListener('error', proxyError); res.end(); + + // Emit the `end` event now that we have completed proxying + self.emit('end', req, res); } }); });