When trying to connect to GDAX's public websocket:
let ws = waitFor newAsyncWebsocket("wss://ws-feed.gdax.com:443/",
ctx=newContext(verifyMode=CVerifyNone))
I get Error: unhandled exception: server did not reply with a websocket upgrade: HTTP/1.1 520 Origin Error
Because I'm able to connect to wss://echo.websocket.org using the same function, and I'm able to connect using python (e.g. create_connection("wss://ws-feed.gdax.com:443/")), I suspect this is on websocket.nim's side. I've tried forking and fiddling around, but no dice
(I've tried it with both the production and sandbox feed)
edit: Forgot to post stats
OS: Ubuntu 16.04 (running in docker image nimlang/nim:latest)
websockets.nim: head
update: looking back at this, I see this is a CloudFlare specific error code:
While the 520 error can be triggered by very unique and strange edge-case scenarios, they are generally caused by:
Connection resets (following a successful TCP handshake)
Headers exceed Cloudflare’s header size limit (over 8kb)
Empty response from origin
Invalid HTTP response
HTTP response missing response headers
But again, I was able to connect to it successfully in python and bash:
When trying to connect to GDAX's public websocket:
I get
Error: unhandled exception: server did not reply with a websocket upgrade: HTTP/1.1 520 Origin Error
Because I'm able to connect to
wss://echo.websocket.org
using the same function, and I'm able to connect using python (e.g.create_connection("wss://ws-feed.gdax.com:443/")
), I suspect this is on websocket.nim's side. I've tried forking and fiddling around, but no dice(I've tried it with both the production and sandbox feed)
edit: Forgot to post stats
update: looking back at this, I see this is a CloudFlare specific error code:
But again, I was able to connect to it successfully in python and bash: