Regression: 14581 XMLHttpRequest never calls onreadystatechange with a readystate == 4 When I make a POST XMLHttpRequest, my handler, assigned to onreadystatechange is never called with readystate == 4 /* 4 means "loaded" */ 14555 performed correctly.
One place to see this bug: http://google.com/calendar Note the red box with the white text "Loading..." at the upper right of the page never goes away, only in this version of webKit.
The bug always happens trying to load the main window of Google Calendar. My callback gets called with state==1, then never gets called again. The bug doesn't happen using the simple example on http://developer.apple.com/internet/webcontent/xmlhttpreq.html. (Uses 'GET') The bug doesn't happen using a custom cgi I wrote, which uses POST, and issues two requests operating in parallel (modeling what Google Calendar is doing). (I've also tried it with just a single outstanding request.)
My guess is it needs to have a server that sends a redirect. Still trying to track it down.
The regression happened between r14566 and r14569, probably in r14569 (fix <rdar://problem/4557926>) due to the following: Also removed XMLHttpRequest from the DOM object cache because XMLHttpRequest objects aren't accessed through the DOM.
Created attachment 8649 [details] Undo the XMLHttpRequest change from r14569 Undoing the XMLHttpRequest part of r14569 fixes the regression, but I have no understanding of the DOM object cache.
Thank you! It looks like, in my case, where the server redirects, that XMLHttpRequest->m_doc->m_view->m_frame becomes nil, sometime between the request's send() has been called. The fix you made possibly keeps the frame from being improperly garbage collected.
(In reply to comment #3) > My guess is it needs to have a server that sends a redirect. Still trying to > track it down. Note that the LayoutTests now support "http" tests that run as CGI scripts on an Apache web server, so it should be possible to write a test case for this. I think it's safe to confirm this bug now, too.
Created attachment 8652 [details] Mitz's patch w/changelog and layout test Uploading for posterity.
Committed revision 14671.
Verified. This fixes my problem with Google Calendar. Thanks guys!