http-party / node-http-proxy

A full-featured http proxy for node.js
https://github.com/http-party/node-http-proxy
Other
13.95k stars 1.98k forks source link

README example implies request instead of response parameter #949

Open nitind opened 8 years ago

nitind commented 8 years ago

The repository README implies that the close callback will be given a request object, when it's really the proxy response object according to the relevant source.

// // Listen for the close event on proxy. // proxy.on('close', function (req, socket, head) { // <-- req should be res // view disconnected websocket connections console.log('Client disconnected'); });

jcrugzz commented 8 years ago

@niallo great find! Would love a quick fix PR :).

caioquirino commented 8 years ago

Quick Fix PR created :)