Fix for bug #20177. Make sure string is set if GetSpec() fails inside http logging code.

This commit is contained in:
gordon%netscape.com 2000-01-19 02:27:00 +00:00
parent 693e0c8f67
commit 3dfff899f2

View File

@ -1238,9 +1238,12 @@ nsresult nsHTTPChannel::Redirect(const char *aNewLocation,
#if defined(PR_LOGGING)
char *newURLSpec;
nsresult log_rv;
newURLSpec = nsnull;
newURI->GetSpec(&newURLSpec);
log_rv = newURI->GetSpec(&newURLSpec);
if (NS_FAILED(log_rv))
newURLSpec = nsCRT::strdup("?");
PR_LOG(gHTTPLog, PR_LOG_ALWAYS,
("ProcessRedirect [this=%x].\tRedirecting to: %s.\n",
this, newURLSpec));