lifo / cramp

Real-time web application framework in Ruby
http://cramp.in
MIT License
1.5k stars 121 forks source link

WebSocket-Origin should be Sec-WebSocket-Origin? #3

Closed igorw closed 13 years ago

igorw commented 14 years ago

http://www.whatwg.org/specs/web-socket-protocol/

The websockets spec only mentions Sec-WebSocket-Origin and Sec-WebSocket-Location. WebScoket-Origin and WebSocket-Locations are not mentioned. This leads me to believe that there should be a Sec- prefix.

Patch: http://gist.github.com/426773

igorw commented 14 years ago

I'm not sure, but it might also be related to: http://axod.blogspot.com/2010/06/websocket-gets-update-and-it-breaks.html

igorw commented 14 years ago

And apparently it is. Looking at a dev branch for the WebSockets-76 draft from em-websockets exactly this appears to be the case:

http://github.com/mloughran/em-websocket/tree/draft76/lib/em-websocket/ http://github.com/mloughran/em-websocket/blob/draft76/lib/em-websocket/handler75.rb http://github.com/mloughran/em-websocket/blob/draft76/lib/em-websocket/handler76.rb

Would be great to have cramp compatible ASAP.

andriytyurnikov commented 14 years ago

see maccman/cramp fork, he implemented websockets-76