'Set a cookie, without checking whether or not it should be set.'

def set_cookie(self, cookie):

    c = self._cookies
    self._cookies_lock.acquire()
    try:
        if (cookie.domain not in c):
            c[cookie.domain] = {}
        c2 = c[cookie.domain]
        if (cookie.path not in c2):
            c2[cookie.path] = {}
        c3 = c2[cookie.path]
        c3[cookie.name] = cookie
    finally:
        self._cookies_lock.release()
