Skip to content

Add support for safe HTTP preference - RFC 8674 #34847

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
Jan 10, 2020
Merged

Add support for safe HTTP preference - RFC 8674 #34847

merged 1 commit into from
Jan 10, 2020

Conversation

pyrech
Copy link
Contributor

@pyrech pyrech commented Dec 6, 2019

Q A
Branch? master
Bug fix? no
New feature? yes
Deprecations? no
Tickets -
License MIT
Doc PR -

RFC 8674 (not a IETF standard at the moment) defines a way for user agents to ask for "safe" content to a server. This PR add helper methods to :

  • know if the user agent prefers a safe content
  • mark the response as safe

@nicolas-grekas nicolas-grekas added this to the next milestone Dec 6, 2019
@cjunge
Copy link

cjunge commented Dec 6, 2019

Is a default value of false the same as not specifying "safe"?

@pyrech
Copy link
Contributor Author

pyrech commented Dec 7, 2019

@cjunge I'm not sure to understand where this default value would be. Do you mean in the request or in the response?

Anyway, from what I understand from the RFC:

  • either the client requests for safe content if possible or it requests a normal response
  • either the server send a response with safe preference applied or it send a normal response.

There is no such thing as "prefering a not safe content" or sending a response with "preference not applied".

@pyrech
Copy link
Contributor Author

pyrech commented Dec 16, 2019

Comments fixed and PR rebased 😉

@nicolas-grekas
Copy link
Member

Oups, wait, tests fail.

@pyrech
Copy link
Contributor Author

pyrech commented Dec 23, 2019

Oups, sorry, tests should be green now

@fabpot
Copy link
Member

fabpot commented Jan 10, 2020

Thank you @pyrech.

fabpot added a commit that referenced this pull request Jan 10, 2020
This PR was merged into the 5.1-dev branch.

Discussion
----------

Add support for safe HTTP preference - RFC 8674

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

[RFC 8674](https://tools.ietf.org/html/rfc8674) (not a IETF standard at the moment) defines a way for user agents to ask for "safe" content to a server. This PR add helper methods to :
- know if the user agent prefers a safe content
- mark the response as safe

Commits
-------

7f2cef7 Add support for safe preference - RFC8674
@fabpot fabpot merged commit 7f2cef7 into symfony:master Jan 10, 2020
@pyrech pyrech deleted the safe-preference branch January 13, 2020 08:01
javiereguiluz added a commit to symfony/symfony-docs that referenced this pull request Feb 17, 2020
This PR was merged into the master branch.

Discussion
----------

Add documentation for RFC 8674 support

Add documentation for the PR symfony/symfony#34847

Fix #12915

Commits
-------

54d06f5 Add documentation for RFC 8674 support
@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.

5 participants