Skip to content

Cookies with certain keys are ignored #1495

@forrestchang

Description

@forrestchang

I have a cookie called version=xxx in Headers, but it ignored by flask, using request.cookies.get('version') can't get the cookie.

I check the code then found these:

# _internal.py

_cookie_params = {
    b"expires",
    b"path",
    b"comment",
    b"max-age",
    b"secure",
    b"httponly",
    b"version",
}

# Ignore parameters.  We have no interest in them.
if key.lower() not in _cookie_params:
    yield _cookie_unquote(key), _cookie_unquote(value)

I don't know the comment "We have no interest in them" mean. Is there anyone can explain that for me? I will be appreciate for that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions