Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upXMLHttpRequest/status-async.htm doesn't complete #3877
Comments
|
@mukilan is working on this |
|
This issue is that in the current implementation, readystatechange is triggered only when the state is changing from LOADING to DONE, and not when it transitions directly from HEADERS_RECEIVED to DONE .The first status call i.e This is a bug with respect to the WHATWG specificaton. However the current implementation seems to be in line with the W3C spec - the last clause under same-origin request event rules reads as follows:
But note that the W3C spec also requires:
which means the readystatechange event will be called in all cases (response body is present or not) I'm not sure whether the choice of following the W3C spec was intentional or just an accident, but it is clear that both the specs require readystatechange to be called even when there is no response body. To maintain consistency, we can remove the gaurd and follow the WHATWG version. |
|
IIRC there was an error elsewhere in wpt which made me tack on the guard. I forget now, but removing the guard seems logical at the moment. |
…ED to DONE Fixes servo#3877
onreadystatechange is never called with readyState == 4 for reasons that escape me, so the overall test times out. Easiest debugging is to comment out all but the first
statuscall, and comment out the CHICKEN and HEAD requests. notify_partial_progress(DoneMsg) is called, but I can't figure out why the readystatechange event doesn't appear to fire.