Bug 393002 - ""Server not found" message for view-source window doesn't display server name" [p=anant@kix.in (Anant Narayanan) r=bsmedberg sr=bzbarsky a1.9=damons]
authorreed@reedloden.com
Tue, 11 Dec 2007 01:55:35 -0800
changeset 8889 11c2ca9ce3a5
parent 8888 b7a482409e74
child 8890 21297a02a6a5
push id1
push userbsmedberg@mozilla.com
push dateThu, 20 Mar 2008 16:49:24 +0000
treeherdermozilla-central@61007906a1f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg, bzbarsky
bugs393002
milestone1.9b2pre
Bug 393002 - ""Server not found" message for view-source window doesn't display server name" [p=anant@kix.in (Anant Narayanan) r=bsmedberg sr=bzbarsky a1.9=damons]
docshell/base/nsDocShell.cpp
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -2947,17 +2947,18 @@ nsDocShell::DisplayLoadError(nsresult aE
         rv = NS_OK;
         formatStrCount = 1;
         error.AssignLiteral("fileNotFound");
     }
     else if (NS_ERROR_UNKNOWN_HOST == aError) {
         NS_ENSURE_ARG_POINTER(aURI);
         // Get the host
         nsCAutoString host;
-        aURI->GetHost(host);
+        nsCOMPtr<nsIURI> innermostURI = NS_GetInnermostURI(aURI);
+        innermostURI->GetHost(host);
         CopyUTF8toUTF16(host, formatStrs[0]);
         formatStrCount = 1;
         error.AssignLiteral("dnsNotFound");
     }
     else if(NS_ERROR_CONNECTION_REFUSED == aError) {
         NS_ENSURE_ARG_POINTER(aURI);
         // Build up the host:port string.
         nsCAutoString hostport;