Bug Tracker

Opened 14 years ago

Closed 14 years ago

Last modified 11 years ago

#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:
Blocked by: Blocking:

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 (1)

jquery.zip (840 bytes) - added by kof13 14 years ago.
test case

Download all attachments as: .zip

Change History (13)

comment:1 Changed 14 years ago by dmethvin

Can you provide a test case?

Changed 14 years ago by kof13

Attachment: jquery.zip added

test case

comment:2 Changed 14 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 14 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 14 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 14 years ago by dqminh

Hi kof13,

By removing settings.data='cstok='+cstok; IE6 will correctly identify it as a GET

comment:6 Changed 14 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 14 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 14 years ago by brandon

Milestone: 1.3.21.3.3
Priority: blockermajor

comment:9 Changed 14 years ago by brandon

Resolution: fixed
Status: newclosed

fixed in r6536

comment:10 Changed 14 years ago by brandon

Resolution: fixed
Status: closedreopened

comment:11 Changed 14 years ago by brandon

Owner: set to brandon
Status: reopenednew

comment:12 Changed 14 years ago by brandon

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.