Closed Bug 905163 Opened 12 years ago Closed 12 years ago

AJAX synchronous call is not working in FF 23.0, breaking on xmlHttpRequest.open()

Categories

(Core :: DOM: Core & HTML, defect)

23 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: mark.meitine, Unassigned, NeedInfo)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36 Steps to reproduce: I need to use synchronous Ajax call which breaks on opening in synchronous mode. The error is NS_ERROR_FAILURE. This code works perfectly in IE, Chrome and Safari. Here I included part of my code. function PostRequest(MyUrl){ var qXML = new XMLHttpRequest(); // some code qXML.open("POST", MyUrl, false); qXML.setRequestHeader('Accept', '*'); qXML.setRequestHeader('Origin', '*'); qXML.setRequestHeader('content-type','application/x-www-form-urlencoded'); try { qXML.send(StringToPost); // some code ..... } catch(err){ alert(err + '\n...unavailable.\nYour request will appear in the new window.'); }; // post log Actual results: I need to use synchronous Ajax call which breaks on opening in synchronous mode. The error is NS_ERROR_FAILURE. This code works perfectly in IE, Chrome and Safari. Here I included part of my code. function PostRequest(MyUrl){ var qXML = new XMLHttpRequest(); // some code qXML.open("POST", MyUrl, false); qXML.setRequestHeader('Accept', '*'); qXML.setRequestHeader('Origin', '*'); qXML.setRequestHeader('content-type','application/x-www-form-urlencoded'); try { qXML.send(StringToPost); // some code ..... } catch(err){ alert(err + '\n...unavailable.\nYour request will appear in the new window.'); }; // post log Expected results: Ajax call executed OK
Mark, it would be preferable to include a complete testcase if possible, so that other people can try to reproduce your results. Did it work correctly in previous versions of Firefox? If so, would you be able to do a regression test using the mozregression tool (http://mozilla.github.io/mozregression/) to find the first bad nightly?
Assignee: general → nobody
Component: JavaScript Engine → DOM
Flags: needinfo?(mark.meitine)
This bug needs either a page showing the problem or a log of the HTTP traffic so we can see what the server response headers looked like. Please reopen once one of those is available.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → INCOMPLETE
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.