'Prepares the given HTTP cookie data.'

def prepare_cookies(self, cookies):

    if isinstance(cookies, cookielib.CookieJar):
        self._cookies = cookies
    else:
        self._cookies = cookiejar_from_dict(cookies)
    cookie_header = get_cookie_header(self._cookies, self)
    if (cookie_header is not None):
        self.headers['Cookie'] = cookie_header
