Bug 1112399 - Treat NS_ERROR_NET_INTERRUPT and NS_ERROR_NET_RESET as SSL errors on https URLs. r=bz

This commit is contained in:
Masatoshi Kimura 2015-01-10 19:52:58 +09:00
parent 9ed929c1a2
commit 867642220c

View File

@ -5162,6 +5162,15 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI *aURI,
// Display the error as a page or an alert prompt
NS_ENSURE_FALSE(messageStr.IsEmpty(), NS_ERROR_FAILURE);
if (NS_ERROR_NET_INTERRUPT == aError || NS_ERROR_NET_RESET == aError) {
bool isSecureURI = false;
rv = aURI->SchemeIs("https", &isSecureURI);
if (NS_SUCCEEDED(rv) && isSecureURI) {
// Maybe TLS intolerant. Treat this as an SSL error.
error.AssignLiteral("nssFailure2");
}
}
if (UseErrorPages()) {
// Display an error page
LoadErrorPage(aURI, aURL, errorPage.get(), error.get(),