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

[HttpClient] fix PHP warning + accept status code >= 600 #36823

Merged
merged 1 commit into from May 16, 2020

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #36717
License MIT
Doc PR -

This fixes the PHP warning reported in the linked issue.

This also relaxes the accepted status codes, with https://www.linkedin.com/company/linkedin/ as an example that returns a non-conformant one (999).

These are now handled as 5xx codes, ie they trigger a ServerException.

@nicolas-grekas nicolas-grekas merged commit cc519aa into symfony:4.4 May 16, 2020
@nicolas-grekas nicolas-grekas deleted the hc-wider-code-range branch May 16, 2020 10:15
@fabpot fabpot mentioned this pull request May 16, 2020
@gmponos
Copy link
Contributor

gmponos commented May 17, 2020

Does this allow also status codes like 1, 9 or 50.. meaning below 100 ?

@nicolas-grekas
Copy link
Member Author

Nope it doesn't. Those will trigger a TransportExceptionInterface

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.

None yet

5 participants