From: Thomas Berezansky Date: Wed, 6 Feb 2013 21:01:49 +0000 (-0500) Subject: ForceExternal: Compare hostnames case insensitive X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a19cb0506359259e1d558c6c24cd54f17bc38c82;p=working%2FEvergreen.git ForceExternal: Compare hostnames case insensitive Lowercase both sides to avoid "right host, wrong case" issues. Resolves LP1081699 where the external browser would be used due to hostname case sensitivity. Signed-off-by: Thomas Berezansky Signed-off-by: Ben Shum Conflicts: Open-ILS/xul/staff_client/components/forceexternal.js --- diff --git a/Open-ILS/xul/staff_client/components/forceexternal.js b/Open-ILS/xul/staff_client/components/forceexternal.js index d93aaca401..4c716843ca 100644 --- a/Open-ILS/xul/staff_client/components/forceexternal.js +++ b/Open-ILS/xul/staff_client/components/forceexternal.js @@ -24,7 +24,7 @@ const myAppHandler = { var targetWindow = wm.getMostRecentWindow("eg_main"); if (targetWindow != null) { var host = targetWindow.G.data.server_unadorned; - if(host && (contentLocation.scheme == 'http' || contentLocation.scheme == 'https') && contentLocation.host != host) { + if(host && (contentLocation.scheme == 'http' || contentLocation.scheme == 'https') && contentLocation.host.toLowerCase() != host.toLowerCase()) { // first construct an nsIURI object using the ioservice var ioservice = Components.classes["@mozilla.org/network/io-service;1"] .getService(Components.interfaces.nsIIOService);