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
The issue comes when nsDocumentOpenI nfo::ReDispatch is called after the initial request is finished (OnStopRequest called).
In that case, the call to aChannel- >SetContentType (aMIMEType) in nsDocumentOpenI nfo::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(aPresConte xt->Document( )->GetWindow( )) failed: file /[...]/ mozilla/ content/ events/ src/nsIMEStateM anager. cpp, line 174 2307150] : ###!!! ASSERTION: win is null. this happens [often on xlib builds]. see bug #79213: 'Error', file /[...]/ mozilla/ content/ events/ src/nsEventStat eManager. cpp, line 957
-1610559552[
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: www.hixie. ch/tests/ evil/page- loading/ incremental/ 001.cgi
http://