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

Remove content-type check on toArray methods #38551

Merged
merged 1 commit into from
Oct 13, 2020

Conversation

jderusse
Copy link
Member

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

Sometime the server provides a generic content type text/plain and prevent people using the toArray method. (ie. AWS metadata endpoint).

This PR removes the check on the content-type.
People trying to json_decode something else will ends with a JsonException anyway.

@fabpot
Copy link
Member

fabpot commented Oct 13, 2020

Thank you @jderusse.

@fabpot fabpot merged commit 9cc3baa into symfony:4.4 Oct 13, 2020
@jderusse jderusse mentioned this pull request Oct 13, 2020
fabpot added a commit that referenced this pull request Oct 14, 2020
This PR was merged into the 4.4 branch.

Discussion
----------

Fix tests

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

Introduced by #38551

Commits
-------

9112249 Fix tests
@fabpot fabpot mentioned this pull request Oct 14, 2020
@jderusse jderusse deleted the json-contenttype branch October 15, 2020 10:01
This was referenced Oct 28, 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.

4 participants