[AWS] Bug in the AWS WebSocket implementation

Emmanuel Briot briot at adacore.com
Fri Jul 27 16:58:19 CEST 2012



One thing we noticed with Pascal is that the web sockets implementation seems to be working great with Firefox and Chrome on the desktop, as well as the new Safari 6 on the desktop.

However, it does not work with previous versions of Safari on the desktop, or with Safari and Chrome on iOS devices.
Apparently, these are using an older version of the protocol, but we haven't managed to make AWS work here.

I wonder if someone on this list would be interested in investigating that issue a bit. We might be able to make nice process all together.

The most recent development version has support for multiple versions of the handshake protocol. The entry point is 

   AWS.Server.Http_Utils.Send_WebSocket_Handshake

based on the headers it receives, it tries to use one version or the other for the handshake. The version that seems to fail currently is in
AWS.Net.WebSocket.Protocol.Draft76

Although it follows closely the procotol in http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-76, the connection is closed immediately by Safari.

A testcase is found in the demo/websockets directory (you might need to change page.thtml to change the hard-coded URL of the server).

I am asking on this list in the hope that someone has experience with other tools (Ruby, Python,…) where connection from iOS is possible, and we could perhaps trace the headers to check what's wrong in AWS.

Help much appreciated,

Thanks in advance
Emmanuel


More information about the AWS mailing list