From 6d1e45631924a909535d5484e066d04a0450721a Mon Sep 17 00:00:00 2001 From: "danm%netscape.com" Date: Tue, 31 Aug 1999 06:49:26 +0000 Subject: [PATCH] temporary groady hack to fix breakage in NS_OpenURI --- uriloader/base/nsDocLoader.cpp | 4 ++++ webshell/src/nsDocLoader.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/uriloader/base/nsDocLoader.cpp b/uriloader/base/nsDocLoader.cpp index 2af1822bb0a3..ba78acb2d18a 100644 --- a/uriloader/base/nsDocLoader.cpp +++ b/uriloader/base/nsDocLoader.cpp @@ -1814,6 +1814,10 @@ nsresult nsDocumentBindInfo::Bind(nsIURI* aURL, nsIStreamListener* aListener, ns nsCOMPtr channel; rv = NS_OpenURI(getter_AddRefs(channel), aURL, loadGroup, eventSinkGetter); + // groady hack! NS_OpenURI fails the first time around, but works + // the second. so we are TEMPORARILY calling it twice to unblock + // clients who trip on the subsequent breakage this causes. + if (NS_FAILED(rv)) rv = NS_OpenURI(getter_AddRefs(channel), aURL, loadGroup, eventSinkGetter); if (NS_FAILED(rv)) return rv; if (postDataStream) diff --git a/webshell/src/nsDocLoader.cpp b/webshell/src/nsDocLoader.cpp index 2af1822bb0a3..ba78acb2d18a 100644 --- a/webshell/src/nsDocLoader.cpp +++ b/webshell/src/nsDocLoader.cpp @@ -1814,6 +1814,10 @@ nsresult nsDocumentBindInfo::Bind(nsIURI* aURL, nsIStreamListener* aListener, ns nsCOMPtr channel; rv = NS_OpenURI(getter_AddRefs(channel), aURL, loadGroup, eventSinkGetter); + // groady hack! NS_OpenURI fails the first time around, but works + // the second. so we are TEMPORARILY calling it twice to unblock + // clients who trip on the subsequent breakage this causes. + if (NS_FAILED(rv)) rv = NS_OpenURI(getter_AddRefs(channel), aURL, loadGroup, eventSinkGetter); if (NS_FAILED(rv)) return rv; if (postDataStream)