eric6/WebBrowser/CookieJar/CookieJar.py

changeset 7268
a28338eaf694
parent 7229
53054eb5b15a
child 7360
9190402e4505
equal deleted inserted replaced
7267:aedc309827c7 7268:a28338eaf694
215 res = self.__isOnDomainList(self.__exceptionsBlock, 215 res = self.__isOnDomainList(self.__exceptionsBlock,
216 request.origin.host()) 216 request.origin.host())
217 if res: 217 if res:
218 return False 218 return False
219 219
220 if self.__acceptCookies == self.AcceptOnlyFromSitesNavigatedTo and \ 220 if (
221 request.thirdParty: 221 self.__acceptCookies == self.AcceptOnlyFromSitesNavigatedTo and
222 request.thirdParty
223 ):
222 return False 224 return False
223 225
224 return True 226 return True
225 227
226 def __rejectCookie(self, cookie, cookieDomain): 228 def __rejectCookie(self, cookie, cookieDomain):
431 withoutDot = rule[1:] 433 withoutDot = rule[1:]
432 if domain == withoutDot: 434 if domain == withoutDot:
433 return True 435 return True
434 else: 436 else:
435 domainEnding = domain[-(len(rule) + 1):] 437 domainEnding = domain[-(len(rule) + 1):]
436 if domainEnding and \ 438 if (
437 domainEnding[0] == "." and \ 439 domainEnding and
438 domain.endswith(rule): 440 domainEnding[0] == "." and
441 domain.endswith(rule)
442 ):
439 return True 443 return True
440 444
441 if rule == domain: 445 if rule == domain:
442 return True 446 return True
443 447

eric ide

mercurial