#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 13 years ago by
Owner: | changed from Adam Peller to gregwilkins |
---|
comment:2 Changed 13 years ago by
comment:3 Changed 13 years ago by
Milestone: | → future |
---|---|
Owner: | changed from gregwilkins to Greg Wilkins |
comment:4 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
cometd hosted version uses application/json, as per http://www.ietf.org/rfc/rfc4627.txt
comment:5 Changed 10 years ago by
Milestone: | future → 1.7 |
---|
Note: See
TracTickets for help on using
tickets.
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: