play-co / hookbox

HookBox is a Comet server and message queue that tightly integrates with your existing web application via web hooks and a REST interface.
http://hookbox.org
MIT License
284 stars 23 forks source link

Hookbox breaks when using a websocket enabled browser on a secure connection (https) #68

Open mallio opened 14 years ago

mallio commented 14 years ago

Hookbox does not use a valid websocket url when on a secure connection. The issue is on line 16 of hookbox.js.

The protocol for secure websockets is wss://, so that code could be changed to be:

url.replace('http://', 'ws://').replace('https://', 'wss://')

or url.replace(/http(s)?:\/\//, 'ws$1://')

krims0n32 commented 13 years ago

Confirming this, with Chrome, and that the workaround above seems ok.