Ticket #5803 (closed enhancement: fixed)
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:2 Changed 3 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 3 years ago by rwaldron
- Milestone changed from 1.5 to 1.4.5
1.4.5 loosely speaking...
comment:5 Changed 3 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 3 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 3 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 3 years ago by rwaldron
- Status changed from reopened to assigned
- Milestone 1.4.4 deleted
retargetting to blank and assigning to me.
comment:11 Changed 2 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 2 years ago by jitter
- Milestone changed from 1.4.5 to 1.5
Move fixed tickets to appropriate milestone
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
