Bugzilla – Bug 14875
Comet should accept single messages
Last modified: 2009-10-26 09:48:03 UTC
At the moment, the SBS Comet implementation does only accept messages encapsulated in a JSON array. It would a good enhancement to also allow single (i.e. not array-encapsulated) messages. E.g. the widely used Comet library for Java (cometd+jetty) uses a single "connect" message. This does not work with the current SBS implementation.
The spec says: All Bayeux messages SHOULD be encapsulated in a JSON array so that multiple messages may be transported together. A Bayeux client or server MUST accept either array of messages and MAY accept a single message This may have been updated since I implemented it, I recall it may have said that everything should be in an array. So it sounds like your client may be broken. Probably wouldn't be much work to support a single message though. Will leave this as a future enhancement, please provide a patch if you're interested in this.