Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is the cookie name not decoded (like the value)? #114

Closed
yvele opened this issue Oct 23, 2020 · 3 comments
Closed

Why is the cookie name not decoded (like the value)? #114

yvele opened this issue Oct 23, 2020 · 3 comments
Labels

Comments

@yvele
Copy link

yvele commented Oct 23, 2020

I'm using jshttp/cookie server side (within an AWS Lambda@Edge function) to parse cookies.
I'm not personally handling the cookie creation and I only want to parse it.

Cookie names created by my vendor contains special characters that are encoded.

I would have the option to get the decoded cookie names like how it is done with the cookie values.

Is this behaviour by design? Is it legitimate to decode the cookie name when parsing?

If so, is cookie name decoding a feature that you may consider?

@GrosSacASac
Copy link

Good question

@dougwilson
Copy link
Contributor

I'm sorry but the original author(s) are no longer around to answer the why that is.

@dougwilson
Copy link
Contributor

I'm going to close this for now since the question was answered.

I'll also add that it was probably not added since decoding of a name would probably complicate adding them to an object. It is likely decoding/encoding the value (at least by default) will eventually be removed, as it has had multiple issues opened that it is unexpected behavior. The RFC does state that servers SHOULD encoding the cookie value if needed, but makes no such statement on the cookie value, so seems to fall outside the cookie spec to mess with the cookie name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants