Opened 11 years ago

Closed 8 years ago

Last modified 8 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:

Description

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 11 years ago by Adam Peller

Owner: changed from Adam Peller to gregwilkins

comment:2 Changed 11 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

dojo.require("dojox.cometd");

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

dojo.require("dojox.cometd.longPollTransportJsonEncoded");

comment:3 Changed 11 years ago by dylan

Milestone: future
Owner: changed from gregwilkins to Greg Wilkins

comment:4 Changed 8 years ago by dylan

Resolution: fixed
Status: newclosed

cometd hosted version uses application/json, as per http://www.ietf.org/rfc/rfc4627.txt

comment:5 Changed 8 years ago by bill

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