Permalink
Browse files

Match the behavior of Firefox and don't get cookie path's when settin…

…g cookies
  • Loading branch information...
1 parent 0bc2a36 commit 66b9b11c1086d124e578c4dde8911bc3880b044e Benjamin C Meyer committed Apr 29, 2009
Showing with 7 additions and 1 deletion.
  1. +7 −1 llmozlib2/qtwebkit_cookiejar/src/networkcookiejar.cpp
@@ -226,13 +226,19 @@ bool NetworkCookieJar::setCookiesFromUrl(const QList<QNetworkCookie> &cookieList
if (cookie.path().isEmpty()) {
cookie.setPath(defaultPath);
- } else if (!d->matchingPath(cookie, urlPath)) {
+ }
+ // Matching the behavior of Firefox, no path checking is done when setting cookies
+ // Safari does something even odder, when that paths don't match it keeps
+ // the cookie, but changes the paths to the default path
+#if 0
+ else if (!d->matchingPath(cookie, urlPath)) {
#ifdef NETWORKCOOKIEJAR_LOGREJECTEDCOOKIES
qDebug() << "NetworkCookieJar::" << __FUNCTION__
<< "Blocked cookie because: path doesn't match: " << cookie << url;
#endif
continue;
}
+#endif
if (cookie.domain().isEmpty()) {
QString host = url.host().toLower();

0 comments on commit 66b9b11

Please sign in to comment.