Bug 71985
Summary: | XMLHttpRequest: multiple open() do not trigger multiple readystatechange events | ||
---|---|---|---|
Product: | WebKit | Reporter: | Deqing Huang <deqing.huang> |
Component: | XML | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | annevk, ap, jchaffraix |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All |
Deqing Huang
According to the XHR spec, a readystatechange event should be fired after the open() method is invoked.
But when invoking open() for multiple times, the readystatechange event is seen only once.
TEST: http://tc.labs.opera.com/apis/XMLHttpRequest/open-open-send.htm
This test case passes in FireFox7
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Deqing Huang
Checking WebCore code I found following comments in XMLHttpRequest::open()
// Check previous state to avoid dispatching readyState event
// when calling open several times in a row.
So apparently this behavior is designed deliberately.
Question is, does it conform to the XHR spec?
Alexey Proskuryakov
Per bug 17481, all browsers used to not dispatch the event in this case. Sounds like this could be a mistake in the spec that Firefox picked up.
Deqing Huang
Ok, that sounds good to me. I will see if the test case should be updated.
Julien Chaffraix
It looks like the behavior of FF (we need to see the other browsers) has changed since the code was written. We did not get the spec updated at the time so more investigation needs to go in before closing this bug.
Alexey Proskuryakov
*** This bug has been marked as a duplicate of bug 46012 ***