by daleharvey · 16y ago · 0 comments
html5 introduced crossdomain requests for xhr because it already proved to restrictive, and flash introduced crossdomain.xml.
I wish w3c stopped pretending that in order to stop people from doing nasty stuff, you have to stop everyone else from doing anything (also looking at you, clipboard)
This may be part of the specification that I am missing, but it seems to suggest that its using exactly the same origin model as original xhr, which is my complaint
as http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-... suggests
"The Web Socket protocol uses the origin model used by Web browsers to restrict which Web pages can contact a Web Socket server when the Web Socket protocol is used from a Web page."
and http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-...
"The first three lines in each case are hard-coded" (referring to the origin)
This is basically the same as the Cross-Origin Resource Sharing spec, another W3C spec supported by some current browsers:
http://www.w3.org/TR/access-control/
> "The first three lines in each case are hard-coded" (referring to the origin)
No, the three hard-coded lines of each handshake part come before the origin headers:
GET /demo HTTP/1.1
Upgrade: WebSocket
Connection: Upgrade
[...]
HTTP/1.1 101 Web Socket Protocol Handshake
Upgrade: WebSocket
Connection: Upgrade
[...]from a guess at the fact they specifically say they use the existing same origin policy, they cant, but the confusion is cleared up with a simple test, I will check tomorrow
This is similar to the origin model for cross-origin XHRs (http://www.w3.org/TR/access-control/#access-control-allow-or...).