mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
b=106865 Blank page instead of SSL error dialog visiting https server
r=rpotts sr=darin a=asa
This commit is contained in:
parent
9bb65bfb9a
commit
67c62394a7
@ -2514,6 +2514,15 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI *aURI, const PRUnichar *aUR
|
||||
formatStrCount = 1;
|
||||
error.Assign(NS_LITERAL_STRING("connectionFailure"));
|
||||
}
|
||||
else if(NS_ERROR_NET_INTERRUPT == aError) {
|
||||
NS_ENSURE_ARG_POINTER(aURI);
|
||||
// Build up the host:port string.
|
||||
nsCAutoString hostport;
|
||||
aURI->GetHostPort(hostport);
|
||||
formatStrs[0].AssignWithConversion(hostport.get());
|
||||
formatStrCount = 1;
|
||||
error.Assign(NS_LITERAL_STRING("netInterrupt"));
|
||||
}
|
||||
else if (NS_ERROR_NET_TIMEOUT == aError) {
|
||||
NS_ENSURE_ARG_POINTER(aURI);
|
||||
// Get the host
|
||||
|
@ -976,6 +976,7 @@ nsresult nsWebShell::EndPageLoad(nsIWebProgress *aProgress,
|
||||
else if (aStatus == NS_ERROR_NET_TIMEOUT ||
|
||||
aStatus == NS_ERROR_REDIRECT_LOOP ||
|
||||
aStatus == NS_ERROR_UNKNOWN_SOCKET_TYPE ||
|
||||
aStatus == NS_ERROR_NET_INTERRUPT ||
|
||||
aStatus == NS_ERROR_NET_RESET) {
|
||||
DisplayLoadError(aStatus, url, nsnull);
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ fileNotFound=The file %S cannot be found. Please check the location and try agai
|
||||
dnsNotFound=%S could not be found. Please check the name and try again.
|
||||
protocolNotFound=%S is not a registered protocol.
|
||||
connectionFailure=The connection was refused when attempting to contact %S.
|
||||
netInterrupt=The connection to %S has terminated unexpectedly. Some data may have been transferred.
|
||||
netTimeout=The operation timed out when attempting to contact %S.
|
||||
redirectLoop=Redirection limit for this URL exceeded. Unable to load the requested page.
|
||||
repost=The page you are trying to view contains POSTDATA that has expired from cache. If you resend the data, any action the form carried out (such as a search or online purchase) will be repeated. To resend the data, click OK. Otherwise, click Cancel.
|
||||
|
@ -48,6 +48,7 @@
|
||||
// DNS RANGE: 41-50
|
||||
// SOCKET RANGE 51-60
|
||||
// CACHE RANGE: 61-70
|
||||
// NET RANGE 2: 71-80
|
||||
|
||||
// XXX Why can't we put all Netwerk error codes in one file to help avoid collisions?
|
||||
|
||||
@ -98,6 +99,9 @@
|
||||
#define NS_ERROR_REDIRECT_LOOP \
|
||||
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 31)
|
||||
|
||||
#define NS_ERROR_NET_INTERRUPT \
|
||||
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 71)
|
||||
|
||||
/**
|
||||
* nsresult passed through onStopRequest if the document could not be fetched from the cache.
|
||||
*/
|
||||
|
@ -89,6 +89,10 @@ ErrorAccordingToNSPR()
|
||||
LOG(("mapping to NS_ERROR_NET_RESET\n"));
|
||||
rv = NS_ERROR_NET_RESET;
|
||||
break;
|
||||
case PR_END_OF_FILE_ERROR:
|
||||
LOG(("mapping to NS_ERROR_NET_INTERRUPT\n"));
|
||||
rv = NS_ERROR_NET_INTERRUPT;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
|
Loading…
Reference in New Issue
Block a user