#6144 closed bug (invalid)
ajax success broken
Reported by: | tuomo | Owned by: | |
---|---|---|---|
Priority: | Milestone: | 1.4.2 | |
Component: | ajax | Version: | 1.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Hello. I use jQuery ajax request in this way:
function sendData(url, callback) {
var values = getPageData(); var encoded = $.toJSON(values);
$.ajax({
type: "POST", url: url, data: encoded, success: callback, dataType: "json"});
}
With very large responses(>100kB) the success function is never called. If response is small, the success function works fine. I don't have any problems with jQuery 1.3.2, the problem is with versions 1.4.2 and 1.4.1
Change History (6)
comment:1 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 Changed 12 years ago by
Resolution: | invalid |
---|---|
Status: | closed → reopened |
comment:3 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | reopened → closed |
Uhh - why was this reopened? Please don't reopen the ticket unless you have something to add.
comment:4 Changed 12 years ago by
I'm pretty sure that my JSON is valid. I pasted my server result to JSON validator http://jsonlint.com/, and the test passed.
There is my server response, this is the valid JSON string. And I can't get it work with jQuery 1.4.2, with 1.3.2 it works fine!
I can send my problematic server response to you with mail...
comment:6 Changed 12 years ago by
Please, check if there's an error. I was parsing strings like "\xFA" which is invalid JSON. Correct version is "\u00FA". An exception wasn't being thrown and success function wasn't being called either.
It's likely because your JSON is malformed, more information here: http://yehudakatz.com/2010/01/15/jquery-1-4-and-malformed-json/