Changeset 846 for trunk/src/network/access/qnetworkcookiejar.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/network/access/qnetworkcookiejar.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) … … 41 41 42 42 #include "qnetworkcookiejar.h" 43 43 44 #include "qnetworkcookiejar_p.h" 44 45 … … 158 159 url object. 159 160 160 Returns true if one or more cookes are set for url otherwise false. 161 Returns true if one or more cookies are set for \a url, 162 otherwise false. 161 163 162 164 If a cookie already exists in the cookie jar, it will be … … 209 211 QString domain = cookie.domain(); 210 212 if (!(isParentDomain(domain, defaultDomain) 211 || isParentDomain(defaultDomain, domain))) { 212 continue; // not accepted 213 } 214 215 // reject if domain is like ".com" 216 // (i.e., reject if domain does not contain embedded dots, see RFC 2109 section 4.3.2) 217 // this is just a rudimentary check and does not cover all cases 218 if (domain.lastIndexOf(QLatin1Char('.')) == 0) 219 continue; // not accepted 220 213 || isParentDomain(defaultDomain, domain))) 214 continue; // not accepted 215 216 // the check for effective TLDs makes the "embedded dot" rule from RFC 2109 section 4.3.2 217 // redundant; the "leading dot" rule has been relaxed anyway, see above 218 // we remove the leading dot for this check 219 if (QNetworkCookieJarPrivate::isEffectiveTLD(domain.remove(0, 1))) 220 continue; // not accepted 221 221 } 222 222 … … 251 251 differing paths, the one with longer path is returned before the 252 252 one with shorter path. In other words, this function returns 253 cookies sorted by path length.253 cookies sorted by path length. 254 254 255 255 The default QNetworkCookieJar class implements only a very basic … … 270 270 QDateTime now = QDateTime::currentDateTime(); 271 271 QList<QNetworkCookie> result; 272 272 273 273 274 // scan our cookies for something that matches … … 280 281 continue; 281 282 if (!(*it).isSessionCookie() && (*it).expirationDate() < now) 283 284 282 285 continue; 283 286 … … 302 305 } 303 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 304 346 QT_END_NAMESPACE
Note:
See TracChangeset
for help on using the changeset viewer.