Bug 126574 - Make abort event sending compliant with XHR spec
Summary: Make abort event sending compliant with XHR spec
Status: RESOLVED DUPLICATE of bug 98404
Alias: None
Product: WebKit
Classification: Unclassified
Component: XML (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-07 05:03 PST by youenn fablet
Modified: 2016-01-15 09:28 PST (History)
2 users (show)

See Also:


Attachments
potential fix over 120828 patch (7.15 KB, patch)
2014-01-07 07:53 PST, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2014-01-07 05:03:25 PST
WebKit always send abort event when XHR abort() method is called. 
http://www.w3.org/TR/XMLHttpRequest/#the-abort()-method mandates to do that only if the XHR state is unset or opened.
Related WTP test is XMLHttpRequest/abort-after-receive.htm
Comment 1 youenn fablet 2014-01-07 05:39:49 PST
XMLHttpRequestUpload events should be sent before XMLHttpRequest events.
This reordering may be handled as part of code refactoring done in bug 120828
Comment 2 youenn fablet 2014-01-07 07:53:39 PST
Created attachment 220528 [details]
potential fix over 120828 patch
Comment 3 youenn fablet 2014-01-13 01:19:04 PST
WebKit XHR implementation currently sends abort event when its state is DONE and abort() is called.
According to spec, the expected behavior should be to not send any abort event, but to ensure that load and loadend events are sent (since XHR is actually DONE).

This should happen in particular even when xhr.abort is called in onreadystatechange callback in DONE case.

Firefox is behaving this way (no abort event but load and loadend events).
Blink currently does not send any load/loadend/abort event at all
Comment 4 youenn fablet 2014-01-13 01:22:37 PST
Potential duplicate of bug 98404
Comment 5 Csaba Osztrogonác 2014-01-13 05:45:05 PST
Please set the r? flag if you would like to ask review.
Comment 6 youenn fablet 2016-01-15 09:28:08 PST

*** This bug has been marked as a duplicate of bug 98404 ***