Fixes bug 84794 (part 2) "Problem with HTTP basic authentication and cookies"

r=gagan, sr=dougt, a=chofmann
This commit is contained in:
darin%netscape.com 2001-06-22 01:43:39 +00:00
parent 8bdc6dcede
commit d580655f64

View File

@ -176,6 +176,10 @@ nsCookieHTTPNotify::OnModifyRequest(nsIHttpChannel *aHttpChannel)
rv = mCookieService->GetCookieStringFromHttp(pURL, pFirstURL, &cookie);
if (NS_FAILED(rv)) return rv;
// Clear any existing Cookie request header
rv = aHttpChannel->SetRequestHeader("Cookie", nsnull);
if (NS_FAILED(rv)) return rv;
// Set the cookie into the request headers
if (cookie && *cookie)
rv = aHttpChannel->SetRequestHeader("Cookie", cookie);