If the response to XMLHTTPRequest is zero-length, not all onreadystatechange events do fire, and the response headers aren't properly retrieved. Steps to reproduce: access the bug URL. In MSIE, the request goes through all states. Firefox skips Interactive. WebKit skips Interactive and Loaded. Even in Completed state, WebKit doesn't provide the headers or the response status.
Created attachment 5217 [details] proposed fix
Additional test case (sync loading): http://nypop.com/~ap/webkit/getzerosync.html
Comment on attachment 5217 [details] proposed fix This looks totally fine. You're just changing slotFinished to match slotData's behavior in the case that slotData was never called. r=me
*** Bug 6271 has been marked as a duplicate of this bug. ***
*** Bug 11207 has been marked as a duplicate of this bug. ***