jcoglan/faye-websocket-node — Issue #4: Haproxy support for draft 76
Author: majek
Created: 2011-12-02 12:36:13+00:00
State: open

Reference: https://github.com/extend/cowboy/issues/73

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 implementation does not support that. Example (nc localhost 8000 and paste):

```
GET /demo HTTP/1.1
Upgrade: WebSocket
Connection: Upgrade
Host: example.com
Origin: http://example.com
Sec-WebSocket-Key1: 4 @1 46546xW%0l 1 5
Sec-WebSocket-Key2: 12998 5 Y3 1 .P00

```

Result:

```
HTTP/1.1 101 Web Socket Protocol Handshake
Upgrade: WebSocket
Connection: Upgrade
Sec-WebSocket-Origin: http://example.com
Sec-WebSocket-Location: ws://example.com/demo

��(�]#�������z2%
```

Expected result: server replying with headers, waiting for 8 byte nonce, and replying with nonce.