BHttpRequest: More elegant way to build cookieString
This commit is contained in:
@@ -937,13 +937,11 @@ BHttpRequest::_SendHeaders()
|
||||
for (BNetworkCookieJar::UrlIterator it
|
||||
= fContext->GetCookieJar().GetUrlIterator(fUrl);
|
||||
(cookie = it.Next()) != NULL;) {
|
||||
if (cookieString.Length() > 0)
|
||||
cookieString << "; ";
|
||||
cookieString << cookie->RawCookie(false);
|
||||
cookieString << "; ";
|
||||
}
|
||||
|
||||
// Remove the extra "; " we added after the last item.
|
||||
cookieString.Truncate(cookieString.Length() - 2);
|
||||
|
||||
if (cookieString.Length() > 0)
|
||||
fOutputHeaders.AddHeader("Cookie", cookieString);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user