From 00908ba8cf779874895ac0d0491ce0b1986a3ec0 Mon Sep 17 00:00:00 2001 From: "darin%netscape.com" Date: Tue, 11 Dec 2001 23:01:08 +0000 Subject: [PATCH] fixes bug 47617 "Connection to https needs to tell user to install PSM if w/o" r=gagan, sr=mscott --- docshell/base/appstrings.properties | 1 + docshell/base/nsWebShell.cpp | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/docshell/base/appstrings.properties b/docshell/base/appstrings.properties index bf1fed3c4256..9a84fb2f940b 100644 --- a/docshell/base/appstrings.properties +++ b/docshell/base/appstrings.properties @@ -27,3 +27,4 @@ redirectLoop=Redirection limit for this URL exceeded. Loading aborted. 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. repostConfirm=The page you are trying to view contains POSTDATA. 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. fileNotFound=%s does not exist or could not be accessed. Please check the file path and try again. +unknownSocketType=Unknown socket type. Loading aborted. diff --git a/docshell/base/nsWebShell.cpp b/docshell/base/nsWebShell.cpp index 840dd082d1cb..5a52fd3abb13 100644 --- a/docshell/base/nsWebShell.cpp +++ b/docshell/base/nsWebShell.cpp @@ -63,6 +63,7 @@ typedef unsigned long HMTX; #include "nsNetUtil.h" #include "nsIProtocolHandler.h" #include "nsIDNSService.h" +#include "nsISocketProvider.h" #include "nsIRefreshURI.h" #include "nsIScriptGlobalObject.h" #include "nsIScriptGlobalObjectOwner.h" @@ -1236,6 +1237,23 @@ nsresult nsWebShell::EndPageLoad(nsIWebProgress *aProgress, getter_Copies(messageStr)); if (NS_FAILED(rv)) return rv; + prompter->Alert(nsnull, messageStr); + } + else if (aStatus == NS_ERROR_UNKNOWN_SOCKET_TYPE) { + nsCOMPtr prompter; + nsCOMPtr stringBundle; + + rv = GetPromptAndStringBundle(getter_AddRefs(prompter), + getter_AddRefs(stringBundle)); + if (!stringBundle) { + return rv; + } + + nsXPIDLString messageStr; + rv = stringBundle->GetStringFromName(NS_LITERAL_STRING("unknownSocketType").get(), + getter_Copies(messageStr)); + if (NS_FAILED(rv)) return rv; + prompter->Alert(nsnull, messageStr); } } // if we have a host