r=rhp. datetime protocol wasn't initializing properly which would cause a datetime url without a host to spin

This commit is contained in:
valeski%netscape.com 2000-01-11 22:16:19 +00:00
Родитель d601e1d680
Коммит e92469cb8e
2 изменённых файлов: 22 добавлений и 12 удалений

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

@ -55,9 +55,20 @@ nsDateTimeChannel::Init(const char* verb,
{
nsresult rv;
NS_ASSERTION(uri, "no uri");
mOriginalURI = originalURI ? originalURI : uri;
mUrl = uri;
rv = mUrl->GetPort(&mPort);
if (NS_FAILED(rv) || mPort < 1)
mPort = DATETIME_PORT;
rv = mUrl->GetPath(getter_Copies(mHost));
if (NS_FAILED(rv)) return rv;
if (!*(const char *)mHost) return NS_ERROR_NOT_INITIALIZED;
rv = SetLoadAttributes(loadAttributes);
if (NS_FAILED(rv)) return rv;
rv = SetLoadGroup(aLoadGroup);
@ -65,12 +76,6 @@ nsDateTimeChannel::Init(const char* verb,
rv = SetNotificationCallbacks(notificationCallbacks);
if (NS_FAILED(rv)) return rv;
rv = mUrl->GetPort(&mPort);
if (NS_FAILED(rv) || mPort < 1)
mPort = DATETIME_PORT;
rv = mUrl->GetPath(getter_Copies(mHost));
if (NS_FAILED(rv)) return rv;
return NS_OK;
}

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

@ -55,9 +55,20 @@ nsDateTimeChannel::Init(const char* verb,
{
nsresult rv;
NS_ASSERTION(uri, "no uri");
mOriginalURI = originalURI ? originalURI : uri;
mUrl = uri;
rv = mUrl->GetPort(&mPort);
if (NS_FAILED(rv) || mPort < 1)
mPort = DATETIME_PORT;
rv = mUrl->GetPath(getter_Copies(mHost));
if (NS_FAILED(rv)) return rv;
if (!*(const char *)mHost) return NS_ERROR_NOT_INITIALIZED;
rv = SetLoadAttributes(loadAttributes);
if (NS_FAILED(rv)) return rv;
rv = SetLoadGroup(aLoadGroup);
@ -65,12 +76,6 @@ nsDateTimeChannel::Init(const char* verb,
rv = SetNotificationCallbacks(notificationCallbacks);
if (NS_FAILED(rv)) return rv;
rv = mUrl->GetPort(&mPort);
if (NS_FAILED(rv) || mPort < 1)
mPort = DATETIME_PORT;
rv = mUrl->GetPath(getter_Copies(mHost));
if (NS_FAILED(rv)) return rv;
return NS_OK;
}