Set a cookie, without checking whether or not it should be set.
(self, cookie)
| 1665 | self._cookies_lock.release() |
| 1666 | |
| 1667 | def set_cookie(self, cookie): |
| 1668 | """Set a cookie, without checking whether or not it should be set.""" |
| 1669 | c = self._cookies |
| 1670 | self._cookies_lock.acquire() |
| 1671 | try: |
| 1672 | if cookie.domain not in c: c[cookie.domain] = {} |
| 1673 | c2 = c[cookie.domain] |
| 1674 | if cookie.path not in c2: c2[cookie.path] = {} |
| 1675 | c3 = c2[cookie.path] |
| 1676 | c3[cookie.name] = cookie |
| 1677 | finally: |
| 1678 | self._cookies_lock.release() |
| 1679 | |
| 1680 | def extract_cookies(self, response, request): |
| 1681 | """Extract cookies from response, where allowable given the request.""" |
no test coverage detected