cookie parsing fixed

This commit is contained in:
acetone
2022-11-22 12:37:15 +03:00
parent 84ffdec23d
commit c762dd9364
+2 -2
View File
@@ -38,8 +38,8 @@ void SocketRunnable::get()
if (urlPath() == "/index.html")
{
const QString cookieString = g::getValue(m_headers, "Cookie", g::GetValueType::HttpHeader);
quint64 lastTrafficVolume = g::getValue(m_headers, LAST_TRAFFIC_VOLUME_COOKIE).toULongLong();
qDebug() << "Cookie trafficvolume: raw " << cookieString << "; parsed" << lastTrafficVolume;
quint64 lastTrafficVolume = g::getValue(cookieString, LAST_TRAFFIC_VOLUME_COOKIE).toULongLong();
qDebug() << "Cookie trafficvolume: raw" << cookieString << "; parsed" << lastTrafficVolume;
quint64 currentTrafficVolume = 0;
httpDocument().setBody( WebPage::document(lastTrafficVolume, &currentTrafficVolume) );
httpDocument().setHeader(HttpDocument::CommonHeader::SetCookie,