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

This commit is contained in:
valeski%netscape.com 1999-12-03 07:01:23 +00:00
Родитель b058c98ccd
Коммит 940d90a9cd
1 изменённых файлов: 4 добавлений и 1 удалений

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

@ -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;