Skip to content

[HttpFoundation] Add support for all core response http control directives #35748

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

Merged
merged 1 commit into from
Apr 5, 2020

Conversation

azjezz
Copy link
Contributor

@azjezz azjezz commented Feb 17, 2020

Q A
Branch? master
Bug fix? no
New feature? yes
Deprecations? no
Tickets Fix #35720
License MIT
Doc PR N/A

Add support for all core cache-control directives

see : https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control

@azjezz azjezz changed the title [HttpFoundation] Add support for all core http control directives [HttpFoundation] Add support for all core response http control directives Feb 17, 2020
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

Please add tests.

@nicolas-grekas nicolas-grekas added this to the next milestone Feb 18, 2020
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

Maybe some tests, a changelog entry?

@azjezz
Copy link
Contributor Author

azjezz commented Mar 31, 2020

Added tests and a changelog entry.

@nicolas-grekas
Copy link
Member

@azjezz thanks. What about #35748 (comment) ?

@fabpot
Copy link
Member

fabpot commented Apr 5, 2020

Thank you @azjezz.

@fabpot fabpot merged commit 402909f into symfony:master Apr 5, 2020
fabpot added a commit that referenced this pull request Apr 8, 2020
This PR was squashed before being merged into the 5.1-dev branch.

Discussion
----------

Fix constant accessor

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Because HTTP_RESPONSE_CACHE_CONTROL_DIRECTIVES is private, using static will fail for any classes extending the Response class. HTTP_RESPONSE_CACHE_CONTROL_DIRECTIVES is already properly using self a bit lower so we should do the same thing here.

Introduced in #35748

Commits
-------

633ff5b Fix constant accessor
@nicolas-grekas nicolas-grekas modified the milestones: next, 5.1 May 4, 2020
@fabpot fabpot mentioned this pull request May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add support for appending no-cache to Cache-Control header
5 participants