Bug Tracker

Ticket #5803 (closed enhancement: fixed)

Opened 5 years ago

Last modified 3 years ago

Set JSONP dataType is jsonpCallback is used

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

Description

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

Change History

comment:1 Changed 5 years ago by dmethvin

  • Component changed from unfiled to ajax

comment:2 Changed 4 years ago by rwaldron

  • Owner set to rwaldron
  • Priority changed from major to low
  • Type changed from bug to enhancement
  • Status changed from new to assigned
  • Milestone changed from 1.4.1 to 1.5

comment:4 Changed 4 years ago by rwaldron

  • Milestone changed from 1.5 to 1.4.5

1.4.5 loosely speaking...

comment:5 Changed 4 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 4 years ago by john

  • Status changed from assigned to closed
  • Resolution set to fixed
  • Milestone changed from 1.4.5 to 1.4.4

comment:7 Changed 4 years ago by john

  • Status changed from closed to reopened
  • Resolution fixed deleted

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

comment:8 Changed 4 years ago by rwaldron

  • Status changed from reopened to assigned
  • Milestone 1.4.4 deleted

retargetting to blank and assigning to me.

comment:9 Changed 4 years ago by rwaldron

  • Milestone set to 1.4.5

comment:10 Changed 4 years ago by rwaldron

  • Keywords ajaxrewrite added

comment:11 Changed 4 years ago by jaubourg

  • Status changed from assigned to closed
  • Resolution set to fixed

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 4 years ago by jitter

  • Milestone changed from 1.4.5 to 1.5

Move fixed tickets to appropriate milestone

Note: See TracTickets for help on using tickets.