Commit c0fb8192 authored by Maciej Małecki's avatar Maciej Małecki Committed by Cédric de Saint Martin

[fix] When client request is aborted, abort server request

parent 64a86da8
......@@ -323,6 +323,13 @@ HttpProxy.prototype.proxyRequest = function (req, res, buffer) {
//
reverseProxy.once('error', proxyError);
//
// If `req` is aborted, we abort our `reverseProxy` request as well.
//
req.on('aborted', function () {
reverseProxy.abort();
});
//
// For each data `chunk` received from the incoming
// `req` write it to the `reverseProxy` request.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment