mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
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:
parent
b058c98ccd
commit
940d90a9cd
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user