RESOLVED CONFIGURATION CHANGED 46012
XMLHttpRequest: readystatechange event is not dispatched when open() is called.
https://bugs.webkit.org/show_bug.cgi?id=46012
Summary XMLHttpRequest: readystatechange event is not dispatched when open() is called.
Attachments
Simplified test case (441 bytes, text/html)
2012-02-01 14:35 PST, Joe Thomas
no flags
Joe Thomas
Comment 1 2012-01-19 07:25:44 PST
(In reply to comment #0) > XMLHttpRequest: readystatechange event is not dispatched when open() is called. > > Per the XHR spec, readystatechange event should be dispatch when we finish processing open(). > > TESTS: > http://tc.labs.opera.com/apis/XMLHttpRequest/abort-after-send.htm > http://tc.labs.opera.com/apis/XMLHttpRequest/open-after-abort.htm > http://tc.labs.opera.com/apis/XMLHttpRequest/open-open-send.htm > http://tc.labs.opera.com/apis/XMLHttpRequest/open-open-sync-send.htm > http://tc.labs.opera.com/apis/XMLHttpRequest/open-send-open.htm > http://tc.labs.opera.com/apis/XMLHttpRequest/open-open-sync-send.htm Currently webkit sends readystatechange event with state "OPENED" when Open() gets called. As per w3c spec http://www.w3.org/TR/XMLHttpRequest/#the-send-method, section 4.7.6(8), readystatechange event needs to be called with the same state for asynchronous XMLHTTPRequest once the Send() flag is set. Looks like this is not happening with webkit. Do we need a fix for this ?
Joe Thomas
Comment 2 2012-02-01 14:35:48 PST
Created attachment 125016 [details] Simplified test case Simplified test case showing the sequence of state when readystatechange event is fired. Webkit browsers fires readystatechange event with [1,2,3,4] (OPENED, HEADERS_RECEIVED, LOADING, DONE) whereas Firefox and IE fires with states [1,1,2,3,4]. As per spec, readystatechange event is supposed to be fired when Send() is called for asynchronous request but webkit does not do that. I will create a patch if we agree to add this.
Alexey Proskuryakov
Comment 3 2013-02-11 14:19:32 PST
*** Bug 71985 has been marked as a duplicate of this bug. ***
Alexey Proskuryakov
Comment 4 2013-02-11 14:20:01 PST
The duplicate has some relevant analysis.
Anne van Kesteren
Comment 5 2023-05-12 23:34:08 PDT
This has been addressed in the past decade.
Note You need to log in before you can comment on or make changes to this bug.