Don't go out to the helper app service if we're dealing with an error page.

Bug 312727, r=biesi, sr=darin


git-svn-id: svn://10.0.0.236/trunk@195577 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2006-04-27 18:00:36 +00:00
parent 17b3344ce1
commit 2cab058f54

View File

@@ -612,6 +612,18 @@ nsresult nsDocumentOpenInfo::DispatchContent(nsIRequest *request, nsISupports *
return NS_ERROR_WONT_HANDLE_CONTENT;
}
// Before dispatching to the external helper app service, check for an HTTP
// error page. If we got one, we don't want to handle it with a helper app,
// really.
if (httpChannel) {
PRBool requestSucceeded;
httpChannel->GetRequestSucceeded(&requestSucceeded);
if (!requestSucceeded) {
// returning error from OnStartRequest will cancel the channel
return NS_ERROR_FILE_NOT_FOUND;
}
}
// Sixth step:
//
// All attempts to dispatch this content have failed. Just pass it off to