BHttpRequest: More elegant way to build cookieString

This commit is contained in:
Stephan Aßmus
2014-02-13 10:21:37 +01:00
parent 6aeaeade6b
commit 1514eb3753
+2 -4
View File
@@ -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);
}