diff options
author | Peter Hartmann <peter.hartmann@nokia.com> | 2009-11-24 09:16:13 (GMT) |
---|---|---|
committer | Peter Hartmann <peter.hartmann@nokia.com> | 2009-11-24 10:01:50 (GMT) |
commit | 0d20ec8604b318ceafd6c35dfe1d73519bf024d3 (patch) | |
tree | 1be89051d1f87901039c50587ff76a1f9910bb97 /src/network | |
parent | 8010d279fa9ee4c47bd4c1fb2cc50ad9ca08f945 (diff) | |
download | Qt-0d20ec8604b318ceafd6c35dfe1d73519bf024d3.zip Qt-0d20ec8604b318ceafd6c35dfe1d73519bf024d3.tar.gz Qt-0d20ec8604b318ceafd6c35dfe1d73519bf024d3.tar.bz2 |
QNetworkCookieJar: don't do path checking when receiving cookies
Actually, the RFC 2109 says cookies should not be stored if the path
attribute is not a prefix of the request URI the cookie comes from.
However, all browsers allow it anyway; with the demo browser e.g.
logging in to wordpress.com was not possible.
We still do path checking when sending cookies, i.e. in
QNetworkCookieJar::cookiesForUrl().
Reviewed-by: Markus Goetz
Task-number: QTBUG-5815
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/access/qnetworkcookiejar.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/network/access/qnetworkcookiejar.cpp b/src/network/access/qnetworkcookiejar.cpp index 19f7217..f826115 100644 --- a/src/network/access/qnetworkcookiejar.cpp +++ b/src/network/access/qnetworkcookiejar.cpp @@ -192,9 +192,10 @@ bool QNetworkCookieJar::setCookiesFromUrl(const QList<QNetworkCookie> &cookieLis // validate the cookie & set the defaults if unset if (cookie.path().isEmpty()) cookie.setPath(defaultPath); - else if (!isParentPath(pathAndFileName, cookie.path())) - continue; // not accepted - + // don't do path checking. See http://bugreports.qt.nokia.com/browse/QTBUG-5815 +// else if (!isParentPath(pathAndFileName, cookie.path())) { +// continue; // not accepted +// } if (cookie.domain().isEmpty()) { cookie.setDomain(defaultDomain); } else { |