ws:// and https

21 views
Skip to first unread message

James Bellinger

unread,
May 22, 2012, 7:58:54 AM5/22/12
to orbite...@googlegroups.com
Hello,

I'm using Orbited2 through Nginx proxy_pass and have yet to get the WebSocket side working.
However the POST method works nicely. Now, my question is, when the site uses HTTP, Firefox
Web Console shows that it fails 400 Bad Request on the WebSocket, and it then promptly tries
the POST method.

However, when I run my site HTTPS, I receive:

[07:52:55.515] uncaught exception: [Exception... "Security error"  code: "1000" nsresult: "0x805303e8 (NS_ERROR_DOM_SECURITY_ERR)"  location: "https://(my site)/Scripts/Orbited2.min.js Line: 5"]

This occurs directly after the output:

[07:52:55.512] INFO net.env.browser.websocket this._opts ({url:"ws://(my site)/ws", wsConstructor:({})}) @ https://(my site)/Scripts/Orbited2.min.js:3

Now, if I alter the Orbited2 code so that the WebSocket code just screws up but does a request via HTTPS, it will move
on to the POST method no problem. However, the default Orbited2 code just fails with this exception. I assume it's
something to do with using ws:// instead of wss://. Orbited2 ought to detect when it is connected over HTTPS and
use wss.

Thanks

James

Niklas B

unread,
Jun 1, 2012, 8:20:40 AM6/1/12
to orbite...@googlegroups.com
Indeed Orbited2 should. Would love if you could add a patch for it, I'm currently focusing primarily on CSP and would love for someone with better ws:// knowledge to look into that part of Orbited2. 

Regards,
Niklas
Reply all
Reply to author
Forward
0 new messages