-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
WebSocket improvements: Haproxy support for hixie76 #73
Comments
Thanks for the report! Can you make one bug report per issue though? It'll be easier to discuss them. |
Thanks. Yes hixie-76 is a huge problem for proxies. Not sure how much I should send back at that point though? How are the other websocket implementations doing here? |
I'm not talking about proxies. I'm talking about haproxy loadbalancer. Other implementations are mostly ignoring the problem and do not work behind loadbalancers. Relevant discussion: https://github.com/miksago/node-websocket-server/issues/29
So, don't wait for nonce, send 101 back just after request headers were received and then block and wait for nonce. |
Haproxy is a proxy by all meaning of the term. :) But yeah if sending the Status-line is all that's needed it should be an easy change. I'll do that one this week. |
I would say status line and the headers, but that needs investigating. |
Can't send all the headers though, we can't calculate the key. |
In hixie76 there is no key in response headers. The nonce is returned after the headers, src:
|
Oh right. Then it's not a problem. It'll even be a little cleaner to do it like this. |
Should be done in 70d28ff. Tell me if that works for you. |
Works fine. Thanks. One comment: on timeout, when headers were given but not nonce yet, an error appears:
I'm not sure what should happen in such case. Is this error desired? |
It's not undesired. A proper error should probably be sent instead, but there's other points where the handshake can fail by crashing so I suppose we can take a look at that later, unless there's an implementation having an issue. I'm doing things on an implementation basis for websocket code at the moment, until the drafts get completed. |
If something else goes bad open a new ticket, thanks. |
In order to get Hixie76 through a HAProxy loadbalancer the server must send response headers before the request nonce is received. In other words: before haproxy will send extra data from the client it expects the server to respond to the header. Current cowboy implementation does not support that. Example (
nc localhost 8080
and paste):Result: cowboy waits.
Expected result: response headers.
How to trigger expected result: type eight more bytes and press enter.
The text was updated successfully, but these errors were encountered: