Skip to content

Instantly share code, notes, and snippets.

@mynameisfiber
Created October 20, 2014 23:25
Show Gist options
  • Select an option

  • Save mynameisfiber/f8d9556d7f7b4816900f to your computer and use it in GitHub Desktop.

Select an option

Save mynameisfiber/f8d9556d7f7b4816900f to your computer and use it in GitHub Desktop.
websockets on aws
$ # Fails on port 80
$ curl -i -N -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Host: XXX.fastforwardlabs.com" -H "Origin: http://XXX.fastforwardlabs.com" http://XXX.fastforwardlabs.com/XXXX
HTTP/1.1 400 Bad Request
Server: nginx/1.4.6 (Ubuntu)
Date: Mon, 20 Oct 2014 23:22:48 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 34
Can "Upgrade" only to "WebSocket".
$ # succeeds on other ports
$ curl -i -N -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Host: XXX.fastforwardlabs.com" -H "Origin: http://XXX.fastforwardlabs.com" http://XXX.fastforwardlabs.com:8081/XXXX
HTTP/1.1 426 Upgrade Required
Server: nginx/1.4.6 (Ubuntu)
Date: Mon, 20 Oct 2014 23:23:55 GMT
Transfer-Encoding: chunked
Connection: keep-alive
Sec-WebSocket-Version: 8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment