Opened 11 years ago
Closed 11 years ago
#12234 closed bug (fixed)
the .load() method,when params is null, the ajax type will be "POST", but not be "GET"
Reported by: | Owned by: | jaubourg | |
---|---|---|---|
Priority: | high | Milestone: | 1.8.1 |
Component: | ajax | Version: | 1.8.0 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The .load() method, when params is "null", the ajax type will be "POST", but it should be "GET"? when version 1.7.2, this type is "GET".
Change History (4)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Thing change will also break our site and is impractical to use workaround since there are third-party tools that use null as params.
The problem lies in typeof null == "object"
true
But the behaviour of .load used to test for boolean value of params
comment:3 Changed 11 years ago by
Component: | unfiled → ajax |
---|---|
Milestone: | None → 1.8.1 |
Owner: | set to jaubourg |
Priority: | undecided → high |
Status: | new → assigned |
comment:4 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Calling load with null as the data parameter now properly issues a GET request, not a POST request. Unit tests added. Fixes #12234.
Changeset: b292c4c2df673d17d8c720e13d4d81ecae4ec499
Note: See
TracTickets for help on using
tickets.
This change also would have broken our site, were it not for our automation tests.
Workaround is to remove the
null
argument, changing calls like this:to this: