r=sdagley. 20669. we were sending a cookie header for *every* url request; empty for urls that didn't have a cookie associated with them. Now we only set cookies when we have one to set

git-svn-id: svn://10.0.0.236/trunk@55168 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
valeski%netscape.com 1999-12-03 07:01:23 +00:00
parent cb3b6882b4
commit eab29136c1

View File

@ -121,7 +121,10 @@ nsCookieHTTPNotify::ModifyRequest(nsISupports *aContext)
// XXX useless convertion from nsString to char * again
const char *cookieRaw = cookie.ToNewCString();
if (!cookieRaw) return NS_ERROR_OUT_OF_MEMORY;
rv = pHTTPConnection->SetRequestHeader(mCookieHeader, cookieRaw);
// only set a cookie header if we have a value to send
if (*cookieRaw)
rv = pHTTPConnection->SetRequestHeader(mCookieHeader, cookieRaw);
nsAllocator::Free((void *)cookieRaw);
return rv;