diff options
Diffstat (limited to 'protocols/VKontakte')
-rw-r--r-- | protocols/VKontakte/src/misc.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index d94361bb96..4fe0e82eb5 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -478,8 +478,11 @@ CMStringW CVkProto::RunRenameNick(LPCWSTR pwszOldName) void CVkProto::GrabCookies(NETLIBHTTPREQUEST *nhr)
{
debugLogA("CVkProto::GrabCookies");
- if (auto *pszCookie = Netlib_GetHeader(nhr, "Set-cookie")) {
- CMStringA szValue = pszCookie, szCookieName, szCookieVal, szDomain;
+ for (int i = 0; i < nhr->headersCount; i++) {
+ if (_stricmp(nhr->headers[i].szName, "Set-cookie"))
+ continue;
+
+ CMStringA szValue = nhr->headers[i].szValue, szCookieName, szCookieVal, szDomain;
int iStart = 0;
while (true) {
bool bFirstToken = (iStart == 0);
|