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

Align Set-Cookie attribute names with RFC6265 syntax #2995

Merged
merged 1 commit into from
Jul 4, 2024

Conversation

daschl
Copy link
Contributor

@daschl daschl commented Jul 3, 2024

This changeset aligns the "Set-Cookie" property names with the RFC6265 in the sense that according to the spec (see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-4.1.1) where property names are using camel-case syntax instead of all lower case.

NOTE: The name of an attribute-value pair is not case sensitive. So while they are presented here in CamelCase, such as "HttpOnly" or "SameSite", any case is accepted. E.x.: "httponly", "Httponly", "hTTPoNLY", etc.

This means that this change is purely cosmetic and helps with consistency with other implementations, i.e. Netty.

This changeset aligns the "Set-Cookie" propertie names with the
RFC6265 in the sense that according to syntax (see
https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-4.1.1)
all the names must uppercase the first character.

Most browsers are lax in how they interpret the cookies so the
old behavior should not cause any issues, but its better to
align with the spec.
Copy link
Member

@idelpivnitskiy idelpivnitskiy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update title, PR description and commit message to clarify that it's not a bug or misbehavior, we only align with spec formatting without impact on anyone. We don't want to mislead anyone in release notes.

@daschl daschl changed the title Set-Cookie names must not be lowercase Align Set-Cookie attributed with Spec (non-breaking) Jul 4, 2024
@daschl daschl changed the title Align Set-Cookie attributed with Spec (non-breaking) Align Set-Cookie attribute names with RFC6265 syntax Jul 4, 2024
@daschl daschl merged commit efb24b3 into apple:main Jul 4, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants