summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Gayed <ggayed>2005-06-07 20:55:05 +0000
committerGrant Gayed <ggayed>2005-06-07 20:55:05 +0000
commit87ebbed33ff66a3b90abc0019b4613a108b1994b (patch)
tree1071571b0b6e9e03a59c807fce76595b2d33d487
parent3d8528dbda503461b66680e5763ac0766e62900b (diff)
downloadeclipse.platform.swt-87ebbed33ff66a3b90abc0019b4613a108b1994b.tar.gz
eclipse.platform.swt-87ebbed33ff66a3b90abc0019b4613a108b1994b.tar.xz
eclipse.platform.swt-87ebbed33ff66a3b90abc0019b4613a108b1994b.zip
90856
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Browser/motif/org/eclipse/swt/browser/Browser.java26
1 files changed, 25 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/motif/org/eclipse/swt/browser/Browser.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/motif/org/eclipse/swt/browser/Browser.java
index a257523de6..fa36348c7c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Browser/motif/org/eclipse/swt/browser/Browser.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/motif/org/eclipse/swt/browser/Browser.java
@@ -1741,12 +1741,36 @@ int /*long*/ OnLocationChange(int /*long*/ aWebProgress, int /*long*/ aRequest,
}
int /*long*/ OnStatusChange(int /*long*/ aWebProgress, int /*long*/ aRequest, int /*long*/ aStatus, int /*long*/ aMessage) {
+ /*
+ * Feature in Mozilla. In Mozilla 1.7.5, navigating to an
+ * HTTPS link without a user profile set causes a crash.
+ * Most requests for HTTPS pages are aborted in OnStartURIOpen.
+ * However, https page requests that do not initially specify
+ * https as their protocol will get past this check since they
+ * are resolved afterwards. The workaround is to check the url
+ * whenever there is a status change, and to abort any https
+ * requests that are detected.
+ */
+ nsIRequest request = new nsIRequest(aRequest);
+ int /*long*/ aName = XPCOM.nsEmbedCString_new();
+ request.GetName(aName);
+ int length = XPCOM.nsEmbedCString_Length(aName);
+ int /*long*/ buffer = XPCOM.nsEmbedCString_get(aName);
+ byte[] bytes = new byte[length];
+ XPCOM.memmove(bytes, buffer, length);
+ XPCOM.nsEmbedCString_delete(aName);
+ String value = new String(bytes);
+ if (value.startsWith(XPCOM.HTTPS_PROTOCOL)) {
+ request.Cancel(XPCOM.NS_BINDING_ABORTED);
+ return XPCOM.NS_OK;
+ }
+
if (statusTextListeners.length == 0) return XPCOM.NS_OK;
StatusTextEvent event = new StatusTextEvent(this);
event.display = getDisplay();
event.widget = this;
- int length = XPCOM.strlen_PRUnichar(aMessage);
+ length = XPCOM.strlen_PRUnichar(aMessage);
char[] dest = new char[length];
XPCOM.memmove(dest, aMessage, length * 2);
event.text = new String(dest);