--
You received this message because you are subscribed to the Google Groups "Chromium HTML5" group.
To post to this group, send email to chromiu...@chromium.org.
To unsubscribe from this group, send email to chromium-html...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-html5/?hl=en.
Wouldn't it be more in the sense of real Web apps if the sockets wouldn't be restricted, at least regarding IMAP/POP3/SMTP/FTP/IRC even SSH/SFTP/LDAP? I am suggesting not blocking the ports, but asking for permission, in a fashion similar to facebook or the web notifications implementation.
What I understood from http://www.kb.cert.org/vuls/id/476267, was that the reason of the restriction is that users can actually access those services? It's a similar logic to : oh well native apps access services, why not restrict them ?
A kind of. WebSocket is basically designed as a new more efficient bi-directional channel between browser and web server. It's intended to provide straightforward way for JavaScript in web apps to a) exchange short message with web server instead of using HTTP with big overhead of HTTP header for each message and b) receive notification from web server without using long-polling HTTP request.It could be something like you say, i.e. raw socket API with UI for asking user for permission, but WebSocket did take a different approach.WebSocket has its own framing. Data from script is encapsulated into WebSocket frames with some header, and then they are sent over TCP.
WebSocket clients can talk only with WebSocket capable servers. Not to allow malicious JavaScript to establish connections to arbitrary hosts (including cross-protocol attack), WebSocket has handshaking. In handshaking process of WebSocket, a client validates that the server is really WebSocket capable server (using a sort of challenge/response) and the server can validate that the client is running script the server knows (using Origin data in handshake).If one want to make browser able to access IMAP/POP/... service, one should put code to bridge WebSocket with them in the front-end server.Takeshi