-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Description
I'm using webpack-dev-server (which uses node-http-proxy) to proxy EventSource connections. Demo project: https://github.com/carlhopf/webpack-dev-server-proxy-eventsource
When calling eventSource.close() client/browser side, the node-http-proxy upstream connection is not closed.
I fixed this attaching a listener in the proxyRes event:
res.on('close', () => {
if (!res.finished) proxyRes.destroy();
});I guess this could added to https://github.com/http-party/node-http-proxy/blob/1.18.1/lib/http-proxy/passes/web-incoming.js#L181
Is this the way to go, should I send a pull request?
Ky6uk, vadger, justice47, repsac-by, louisch and 5 moresurecloud-jleite and esfomeadoKirlovon, bitBeater and victorekpo
Metadata
Metadata
Assignees
Labels
No labels