def get_cookies_from_headers(headers):
    """Get cookies dict from headers' Set-Cookie"""
    cookies = {}
    cookie_list = None
    for k, v in headers.items():
        if k.lower() == 'set-cookie':
            cookie_list = headers[k].split('\n')
    if cookie_list:
        for line in cookie_list:
            forward, backward = line.split(';', 1)
            key, value = forward.split('=', 1)
            cookies[key] = value
    return cookies
