Opened 14 years ago

Closed 11 years ago

Last modified 11 years ago

#6697 closed enhancement (fixed)

Send long-polling content as text/json rather than application/x-www-form-urlencoded

Reported by: gregwilkins Owned by: Greg Wilkins
Priority: high Milestone: 1.7
Component: Dojox Version: 1.1.0
Keywords: cometd json Cc:
Blocked By: Blocking:


The bayeux spec allows bayeux messages to be sent either directly as text/json or encoded as the messages parameter of application/x-www-form-urlencoded.

The former is much more efficient on both client and server as the many special characters in json do not need to be % encoded and decoded.

The cometd servers should be checked that they support both formats and the client updated to use the more efficient transport

Change History (5)

comment:1 Changed 14 years ago by Adam Peller

Owner: changed from Adam Peller to gregwilkins

comment:2 Changed 14 years ago by gregwilkins

In order to support this, I have broken out the transports into their own js files: cometd/longPollTransportFormEncoded.js cometd/longPollTransportJsonEncoded.js cometd/callbackPollTransport.js

There is also a dummy cometd/longPollTransport.js which just loads the default (longPollTransportFormEncoded).

The variants of longPolling register themselves both as "long-polling" and "long-polling-form-encoded"/"long-polling-json-encoded"

The default cometd.js file requires callbackPollTransport and longPollTransport so that the default implementation is obtained with


But if a specific set of transports are wanted, these can be specified like:


comment:3 Changed 14 years ago by dylan

Milestone: future
Owner: changed from gregwilkins to Greg Wilkins

comment:4 Changed 11 years ago by dylan

Resolution: fixed
Status: newclosed

cometd hosted version uses application/json, as per

comment:5 Changed 11 years ago by bill

Milestone: future1.7
Note: See TracTickets for help on using tickets.