Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[HttpFoundation] Expired cookies string representation consistency & tests#38369

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:masterfromiquito:master
Oct 4, 2020

Conversation

@iquito
Copy link
Contributor

@iquitoiquito commentedOct 1, 2020
edited
Loading

QA
Branch?master
Bug fix?no
New feature?yes
Deprecations?no
LicenseMIT

These changes add consistent behavior when converting expired cookies back and forth from string representation intoSymfony\Component\HttpFoundation\Cookie instances inCookie::fromString:

  • WhenMax-Age is zero andexpires is in the past, theexpires date is kept as is (previous behavior:expires is overwritten with current timestamp because it is reset to current timestamp +Max-Age)
  • WhenMax-Age is zero andexpires is in the future, expires is reset to current timestamp, asMax-Age is the preferred "source of truth" (same as previous behavior)
  • Add tests for how the Cookie class handlesMax-Age in a cookie string and howexpires andMax-Age interact
  • Extract helper functionexpiresTimestamp so converting to a unix timestamp can be reused inCookie::fromString

This is more a new feature than a bug fix in my mind, therefore I would include it in 5.1+.

@fabpot
Copy link
Member

Thank you@iquito.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@stofstofstof left review comments

@fabpotfabpotfabpot approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

5.2

Development

Successfully merging this pull request may close these issues.

5 participants

@iquito@fabpot@stof@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp