Skip to content

Include websocket non-upgrade response #1184

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

Closed

Conversation

Tigge
Copy link
Contributor

@Tigge Tigge commented Jun 20, 2017

When the server do not accept the upgrade request for websockets the
response was previously not included and sent back. Now the proxy will
include the headers and the content from the server and the response in
these cases. Fixes #890.

@Tigge
Copy link
Contributor Author

Tigge commented Jun 20, 2017

To expand a bit: This will allow node-http-proxy to support some authentication schemes when required by the remote server. If this is supported depends on the browser, but Chrome and Firefox for example will happily work with digest authentication with this addition.

Even if we disregard the added benefits above it seems correct for the proxy to relay back the error messages from the server, whatever it may be.

@Tigge Tigge force-pushed the websocket-upgrade-fail-response branch from 80331bd to a04e0f7 Compare June 20, 2017 12:08
When the server do not accept the upgrade request for websockets the
server's response was previously not included and sent back. Now the
proxy will include the response in these cases. Fixes http-party#890.

Change-Id: I142a15ee12603f54d611ae9362a94c62fb3c9f36
@Tigge Tigge force-pushed the websocket-upgrade-fail-response branch from a04e0f7 to 9600092 Compare June 20, 2017 12:13
@Tigge
Copy link
Contributor Author

Tigge commented Jun 20, 2017

@jcrugzz I think the remaining test issues are caused by socket.io using const and not by any changes I have introduced. The test would probably fail on master now as well. Any thoughts on how to proceed?

@jcrugzz
Copy link
Contributor

jcrugzz commented Apr 19, 2018

@Tigge thanks! I am cherry-picking this into my maintenance branch so that I can get this merged in later tonight in one go as I go through all the PRs.

@jcrugzz jcrugzz closed this Apr 19, 2018
@jcrugzz
Copy link
Contributor

jcrugzz commented Apr 20, 2018

superseded by #1251

@Tigge Tigge deleted the websocket-upgrade-fail-response branch April 23, 2018 05:39
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.

2 participants