Skip to content

Non-session Cookies won't saved without persistSession flag #55

@mertcorumlu

Description

@mertcorumlu

I think the condition on this line is not true: https://github.com/flutterchina/cookie_jar/blame/a14f284ba731fc2e69bd940770b182adb2659781/lib/src/jar/persist.dart#L133

final isSession = cookie.cookie.expires == null && cookie.cookie.maxAge == null;
if ((isSession && persistSession) || (persistSession && !cookie.isExpired())) {
    return MapEntry(key, cookie);
} else {
    return MapEntry(null, cookie);
}

Why should persistSession be true to save cookies that are not session cookies and not expired ? This condition implies, one should should store all cookies including session cookies, or none at all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions