sockjs-protocol
sockjs-protocol copied to clipboard
An attempt to define SockJS protocol
Source code of verify_content_type: ``` def verify_content_type(self, r, content_type): self.assertEqual(r['content-type'].replace(' ', ''), content_type) ``` It always fails when content_type contains space: ``` self.verify_content_type(r, 'text/plain; charset=UTF-8') ```
Some websocket implementations can't receive/send binary data over websockets yet: https://bugzilla.mozilla.org/show_bug.cgi?id=666349 We also need to make that working over fallback protocols.
To prevent clickjacking new browsers introduced `X-Frame-Options` header. Although SockJS does not have any clickable elements, it would be good to send this header for hygiene. Especially for pages that...
Twice in the tests we use POST_async with load set to False. This is racy. We should change the protocol to always send headers immediately, also on XHR-polling. This requires...
There's a significant difference between behaviour of primitive transports such as polling and more advanced transport such as websockets in case of closing connection in user app (see http://pastie.org/pastes/3011573). So...
Heartbeats are not tested now. They should be.
The protocol spec needs better structure. The simplest way to start fixing structure is to have a table of contents.