Ticket #4183 (closed bug: fixed)
post/get ajax bug in IE 6-8
| Reported by: | kof13 | Owned by: | brandon |
|---|---|---|---|
| Priority: | major | Milestone: | 1.4 |
| Component: | ajax | Version: | 1.3.1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
If I try to do $.get - FF works fine, but IE 6-8 sends the request as a post. So our error handler notes "empty post request".
Attachments
Change History
comment:2 Changed 4 years ago by kof13
I tryed to reproduce this case outside of the website. It seems to be a bit special case.
I was trying to set a global parameter for all ajax requests: cstok = 'asdfast2345twgew35aer';
$(document).ajaxSend(function(e, xhr, settings){
settings.data='cstok='+cstok;
});
comment:3 Changed 4 years ago by dmethvin
Since you're doing a get, why did you use settings.data? wouldn't you append your cstok to the url instead?
comment:4 Changed 4 years ago by kof13
Well,
1.actually I not really need this param by get. I just didn't asked if this is a POST or not and got problems in IE becouse all GET requests were POST now. (if (settings.type=='POST'))
2.Of course I can add this param to the url
$(document).ajaxSend(function(e, xhr, settings){ settings.url+='?cstok='+cstok; });
But it seems to be to late at this moment, so it didn't works
3.Nevertheless the real problem that its working in IE and FF not at the same way.
My original idea was to add this parameter to all requests global, to not to do it in each request. Is there any other way to do it?
comment:5 Changed 4 years ago by dqminh
Hi kof13,
By removing settings.data='cstok='+cstok; IE6 will correctly identify it as a GET
comment:6 Changed 4 years ago by kof13
Yes, I know. Its just inconsistent behavior in IE-FF, if you think its not a bug just close the ticket.
comment:7 Changed 4 years ago by hakre
Looks like, that things are not properly handeled here. I vote for taking such things strict. This will remove side-effects and the usability will increase.
comment:8 Changed 4 years ago by brandon
- Priority changed from blocker to major
- Milestone changed from 1.3.2 to 1.3.3
comment:9 Changed 4 years ago by brandon
- Status changed from new to closed
- Resolution set to fixed
fixed in r6536
comment:10 Changed 4 years ago by brandon
- Status changed from closed to reopened
- Resolution fixed deleted
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.


Can you provide a test case?