force uri dispatching to always be on if the url we are trying to load

is a mailto url. why? because it works so well for mailto =). No sense
in only allowing people turning uri dispatching on to get the benefits.
r=travis.
This commit is contained in:
mscott%netscape.com 1999-11-23 07:14:45 +00:00
Родитель 6d07de8143
Коммит add180df18
2 изменённых файлов: 36 добавлений и 18 удалений

Просмотреть файл

@ -534,19 +534,28 @@ nsDocLoaderImpl::LoadDocument(nsIURI * aUri,
if (NS_SUCCEEDED(rv))
prefs->GetBoolPref("browser.uriloader", &useURILoader);
nsXPIDLCString aUrlSpec;
nsXPIDLCString aUrlScheme;
if (aUri)
aUri->GetScheme(getter_Copies(aUrlScheme));
// temporary hack alert! whether uri loading is turned on or off,
// I want mailto urls to properly get sent to the uri loader because
// it works so well...=)
// so for now, if the protocol scheme is mailto, for useURILoader to true
if (nsCRT::strcasecmp(aUrlScheme, "mailto") == 0)
useURILoader = PR_TRUE;
// right now, uri dispatching is only hooked up to work with imap, mailbox and
// news urls...so as a hack....check the protocol scheme and only call the
// dispatching code for those schemes which work with uri dispatching...
if (useURILoader && aUri)
{
aUri->GetScheme(getter_Copies(aUrlSpec));
if (nsCRT::strcasecmp(aUrlSpec, "imap") == 0
|| nsCRT::strcasecmp(aUrlSpec, "news") == 0
|| nsCRT::strcasecmp(aUrlSpec, "mailbox") == 0
|| nsCRT::strcasecmp(aUrlSpec, "mailboxMessage") ==0
|| nsCRT::strcasecmp(aUrlSpec, "mailto") == 0
|| nsCRT::strcasecmp(aUrlSpec, "http") == 0)
{
if (nsCRT::strcasecmp(aUrlScheme, "imap") == 0
|| nsCRT::strcasecmp(aUrlScheme, "news") == 0
|| nsCRT::strcasecmp(aUrlScheme, "mailbox") == 0
|| nsCRT::strcasecmp(aUrlScheme, "mailboxMessage") ==0
|| nsCRT::strcasecmp(aUrlScheme, "mailto") == 0
|| nsCRT::strcasecmp(aUrlScheme, "http") == 0)
{
nsCOMPtr<nsIProgressEventSink> progressSink = do_QueryInterface(aContainer);
nsCOMPtr<nsIURIContentListener> contentListener = do_QueryInterface(aContainer);

Просмотреть файл

@ -534,19 +534,28 @@ nsDocLoaderImpl::LoadDocument(nsIURI * aUri,
if (NS_SUCCEEDED(rv))
prefs->GetBoolPref("browser.uriloader", &useURILoader);
nsXPIDLCString aUrlSpec;
nsXPIDLCString aUrlScheme;
if (aUri)
aUri->GetScheme(getter_Copies(aUrlScheme));
// temporary hack alert! whether uri loading is turned on or off,
// I want mailto urls to properly get sent to the uri loader because
// it works so well...=)
// so for now, if the protocol scheme is mailto, for useURILoader to true
if (nsCRT::strcasecmp(aUrlScheme, "mailto") == 0)
useURILoader = PR_TRUE;
// right now, uri dispatching is only hooked up to work with imap, mailbox and
// news urls...so as a hack....check the protocol scheme and only call the
// dispatching code for those schemes which work with uri dispatching...
if (useURILoader && aUri)
{
aUri->GetScheme(getter_Copies(aUrlSpec));
if (nsCRT::strcasecmp(aUrlSpec, "imap") == 0
|| nsCRT::strcasecmp(aUrlSpec, "news") == 0
|| nsCRT::strcasecmp(aUrlSpec, "mailbox") == 0
|| nsCRT::strcasecmp(aUrlSpec, "mailboxMessage") ==0
|| nsCRT::strcasecmp(aUrlSpec, "mailto") == 0
|| nsCRT::strcasecmp(aUrlSpec, "http") == 0)
{
if (nsCRT::strcasecmp(aUrlScheme, "imap") == 0
|| nsCRT::strcasecmp(aUrlScheme, "news") == 0
|| nsCRT::strcasecmp(aUrlScheme, "mailbox") == 0
|| nsCRT::strcasecmp(aUrlScheme, "mailboxMessage") ==0
|| nsCRT::strcasecmp(aUrlScheme, "mailto") == 0
|| nsCRT::strcasecmp(aUrlScheme, "http") == 0)
{
nsCOMPtr<nsIProgressEventSink> progressSink = do_QueryInterface(aContainer);
nsCOMPtr<nsIURIContentListener> contentListener = do_QueryInterface(aContainer);