From 061a82d9f9a21f157c6bb15b8e2889e067b32a0b Mon Sep 17 00:00:00 2001 From: "darin%netscape.com" Date: Fri, 15 Sep 2006 09:51:42 +0000 Subject: [PATCH] fixes bug 124042 "support internationalized URIs" r=dougt, sr=alecf, a=asa git-svn-id: svn://10.0.0.236/trunk@211787 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/docshell/base/nsAboutRedirector.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mozilla/docshell/base/nsAboutRedirector.cpp b/mozilla/docshell/base/nsAboutRedirector.cpp index 8c0032868c3..f37d5778062 100644 --- a/mozilla/docshell/base/nsAboutRedirector.cpp +++ b/mozilla/docshell/base/nsAboutRedirector.cpp @@ -43,6 +43,7 @@ #include "nsCOMPtr.h" #include "nsIURI.h" #include "nsXPIDLString.h" +#include "nsString2.h" #include "plstr.h" #include "nsIScriptSecurityManager.h" @@ -63,8 +64,8 @@ NS_IMETHODIMP nsAboutRedirector::NewChannel(nsIURI *aURI, nsIChannel **result) { NS_ENSURE_ARG(aURI); - nsXPIDLCString path; - (void)aURI->GetPath(getter_Copies(path)); + nsCAutoString path; + (void)aURI->GetPath(path); nsresult rv; nsCOMPtr ioService(do_GetService(kIOServiceCID, &rv)); if (NS_FAILED(rv)) @@ -73,10 +74,11 @@ nsAboutRedirector::NewChannel(nsIURI *aURI, nsIChannel **result) static const char kChromePrefix[] = "chrome:"; for (int i = 0; i< kRedirTotal; i++) { - if (!PL_strcasecmp(path, kRedirMap[i][0])) + if (!PL_strcasecmp(path.get(), kRedirMap[i][0])) { nsCOMPtr tempChannel; - rv = ioService->NewChannel(kRedirMap[i][1], nsnull, getter_AddRefs(tempChannel)); + rv = ioService->NewChannel(nsDependentCString(kRedirMap[i][1]), + nsnull, nsnull, getter_AddRefs(tempChannel)); //-- If we're redirecting to a chrome URL, change the owner of the channel // to keep the page from getting unnecessary privileges. if (NS_SUCCEEDED(rv) && result &&