Comment 210 for bug 25830

Revision history for this message
In , Sylvain Pasche (sylvain-pasche) wrote :

The issue comes when nsDocumentOpenInfo::ReDispatch is called after the initial request is finished (OnStopRequest called).

In that case, the call to aChannel->SetContentType(aMIMEType) in nsDocumentOpenInfo::ReDispatch does not change the content type, as the channel has no listener any more. Because the content type did not change, the parser thinks it is XML, that's why we saw expat exceptions.

I tried to hack nsHttpChannel::SetContentType to force setting the content type, even when it has no listeners. That fixes the expat assertion and the page displays, but the spinner keeps running and there's some assertions appearing:

-1610559552[2307150]: WARNING: NS_ENSURE_TRUE(aPresContext->Document()->GetWindow()) failed: file /[...]/mozilla/content/events/src/nsIMEStateManager.cpp, line 174
-1610559552[2307150]: ###!!! ASSERTION: win is null. this happens [often on xlib builds]. see bug #79213: 'Error', file /[...]/mozilla/content/events/src/nsEventStateManager.cpp, line 957

If Redispatch is called while the request is not finished, things seem to be working better (spinner stop running after page is finished). I used the following useful URL for testing:
http://www.hixie.ch/tests/evil/page-loading/incremental/001.cgi