'Return cookies as a string of "
"-separated "Set-Cookie3" headers.
ignore_discard and ignore_expires: see docstring for FileCookieJar.save'

def as_lwp_str(self, ignore_discard=True, ignore_expires=True):

    now = time.time()
    r = []
    for cookie in self:
        if ((not ignore_discard) and cookie.discard):
            continue
        if ((not ignore_expires) and cookie.is_expired(now)):
            continue
        r.append(('Set-Cookie3:    %s' % lwp_cookie_str(cookie)))
    return '\n'.join((r + ['']))
