Bug Tracker

Opened 8 years ago

Closed 7 years ago

Last modified 6 years ago

#5803 closed enhancement (fixed)

Set JSONP dataType is jsonpCallback is used

Reported by: yehuda Owned by: Rick Waldron
Priority: low Milestone: 1.5
Component: ajax Version: 1.4
Keywords: ajaxrewrite Cc:
Blocked by: Blocking:

Description

If the user uses the jsonpCallback setting, we should automatically set the dataType to "jsonp".

Change History (12)

comment:1 Changed 7 years ago by dmethvin

Component: unfiledajax

comment:2 Changed 7 years ago by Rick Waldron

Milestone: 1.4.11.5
Owner: set to Rick Waldron
Priority: majorlow
Status: newassigned
Type: bugenhancement

comment:4 Changed 7 years ago by Rick Waldron

Milestone: 1.51.4.5

1.4.5 loosely speaking...

comment:5 Changed 7 years ago by curiousdannii

Does your change mean that if jsonpCallback is set through $.ajaxSetup() then all requests will be converted to jsonp? It could be useful to set a default callback but have it still only apply to requests specifically set to jsonp. I suggest changing the test to:

if ( origSettings.jsonpCallback ) { ... }

comment:6 Changed 7 years ago by john

Milestone: 1.4.51.4.4
Resolution: fixed
Status: assignedclosed

comment:7 Changed 7 years ago by john

Resolution: fixed
Status: closedreopened

I backed out that patch due to possible problems with the implementation.

comment:8 Changed 7 years ago by Rick Waldron

Milestone: 1.4.4
Status: reopenedassigned

retargetting to blank and assigning to me.

comment:9 Changed 7 years ago by Rick Waldron

Milestone: 1.4.5

comment:10 Changed 7 years ago by Rick Waldron

Keywords: ajaxrewrite added

comment:11 Changed 7 years ago by jaubourg

Resolution: fixed
Status: assignedclosed

Fixes #5803. Reworked jsonp prefilter so that it sets the dataType as jsonp and recognizes requests with originalSettings having jsonp or jsonpCallback to be jsonp. Moved default jsonp option value into ajaxSettings. Attached the transport to "jsonp" which avoids unnecessary testing. Transport factory sets dataType back to json for proper data conversion.

Changeset: 62a1a1a8fa64f92f429a3f5b8ed2e0d1f6fc3d6c

comment:12 Changed 7 years ago by jitter

Milestone: 1.4.51.5

Move fixed tickets to appropriate milestone

Note: See TracTickets for help on using tickets.