Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README example implies request instead of response parameter #949

Open
nitind opened this issue Feb 2, 2016 · 2 comments
Open

README example implies request instead of response parameter #949

nitind opened this issue Feb 2, 2016 · 2 comments

Comments

@nitind
Copy link

nitind commented Feb 2, 2016

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
Copy link
Contributor

jcrugzz commented Feb 2, 2016

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

caioquirino pushed a commit to caioquirino/node-http-proxy that referenced this issue Feb 2, 2016
README example implies request instead of response parameter
@caioquirino
Copy link
Contributor

Quick Fix PR created :)

jcrugzz added a commit that referenced this issue Feb 15, 2016
#949 Proxy example using req instead res on README
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants