зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
7b12131f67
Коммит
6229cb8e6d
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче