Modify ↓
Ticket #5862 (closed bug: fixed)
jQuery 1.4.0 breaks URL for AJAX GET if data contains key named "length"
| Reported by: | jcrocholl | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.4.1 |
| Component: | ajax | Version: | 1.4 |
| Keywords: | ajax get data length url | Cc: | jquery@… |
| Blocking: | Blocked by: |
Description
This used to work in jQuery 1.3.2, but it's broken on 1.4.0:
$.ajax({ type: "GET", url: "/json/", data: {left: "abc", length: 3}, dataType: "json", cache: true, success: function() {...} })
jQuery 1.3.2 calls the following URL: /json/?left=abc&length=3
jQuery 1.4.0 calls the following URL: /json/?0=undefined&1=undefined&2=undefined
The number of undefined parameters is equal to the value of length in data.
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

Fixed. http://github.com/jquery/jquery/commit/f91b944cabf7be9aadb40ffe35fce76b50f5f25f