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

Emit http-proxy:outgoing:ws:error for errors after the upgrade header. #495

Closed
wants to merge 1 commit into from

Conversation

glasser
Copy link
Contributor

@glasser glasser commented Oct 8, 2013

The Node http client (at least in 0.10.x) removes the socket error handler
(which forwards errors from socket to request) before invoking 'upgrade'. So we
need to put our error handler back on it if we don't want errors (eg
ECONNRESET/EPIPE) talking to the server to throw.

See https://gist.github.com/glasser/6893545 for an example script showing why this is necessary.

The Node http client (at least in 0.10.x) removes the socket error handler
(which forwards errors from socket to request) before invoking 'upgrade'. So we
need to put our error handler back on it if we don't want errors (eg
ECONNRESET/EPIPE) talking to the server to throw.
@yawnt
Copy link
Contributor

yawnt commented Oct 9, 2013

i am in the process of refactoring how errors are handled (dropping wildcards among other things), but i'll make sure to include this... thanks! :D

yawnt added a commit that referenced this pull request Nov 7, 2013
@yawnt
Copy link
Contributor

yawnt commented Nov 7, 2013

added, sorry for the late fix

@yawnt yawnt closed this Nov 7, 2013
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

Successfully merging this pull request may close these issues.

None yet

2 participants