Commit f2f5f6c3 authored by hausmann@webkit.org's avatar hausmann@webkit.org

2009-01-06 Simon Hausmann <simon.hausmann@nokia.com>

        Unreviewed build fix.

        Fix the Qt build with Qt 4.4.x, the HTTP-only cookie support was
        added in Qt 4.5.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39651 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 42c64121
2009-01-06 Simon Hausmann <simon.hausmann@nokia.com>
Unreviewed build fix.
Fix the Qt build with Qt 4.4.x, the HTTP-only cookie support was
added in Qt 4.5.
* platform/qt/CookieJarQt.cpp:
(WebCore::setCookies):
(WebCore::cookies):
2009-01-06 Zalan Bujtas <zbujtas@gmail.com>
Reviewed by David Kilzer.
......@@ -71,6 +71,7 @@ void setCookies(Document* document, const KURL& url, const KURL& policyURL, cons
return;
QList<QNetworkCookie> cookies = QNetworkCookie::parseCookies(QString(value).toAscii());
#if QT_VERSION >= 0x040500
QList<QNetworkCookie>::Iterator it = cookies.begin();
while (it != cookies.end()) {
if (it->isHttpOnly())
......@@ -78,6 +79,7 @@ void setCookies(Document* document, const KURL& url, const KURL& policyURL, cons
else
++it;
}
#endif
jar->setCookiesFromUrl(cookies, p);
#else
QCookieJar::cookieJar()->setCookies(u, p, (QString)value);
......@@ -98,8 +100,10 @@ String cookies(const Document* document, const KURL& url)
QStringList resultCookies;
foreach (QNetworkCookie networkCookie, cookies) {
#if QT_VERSION >= 0x040500
if (networkCookie.isHttpOnly())
continue;
#endif
resultCookies.append(QString::fromAscii(
networkCookie.toRawForm(QNetworkCookie::NameAndValueOnly).constData()));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment