Skip to content

[HttpClient] Fix strict parsing of response status codes #35324

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 13, 2020
Merged

[HttpClient] Fix strict parsing of response status codes #35324

merged 1 commit into from
Jan 13, 2020

Conversation

Armando-Torres
Copy link

Q A
Branch? 5.0
Bug fix? yes
New feature? no
Deprecations? no
Tickets No ticket opened
License MIT
Doc PR No new feature

If you wait a strict Http code response by the server were you request, but the server response isn't strict and only return HTTP/1.1 200 we have a problem without sense to be strict on regular expression.

@nicolas-grekas
Copy link
Member

I'm not sure about \s. Does your server use a tab? Or does it only miss the trailing space?
Not that HTTP mandates the trailing space, but I get we can accept ending with the code.

@nicolas-grekas nicolas-grekas added this to the 4.3 milestone Jan 13, 2020
@nicolas-grekas nicolas-grekas changed the title Fix/httpclient strict response status codes [HttpClient] Fix strict parsing of response status codes Jan 13, 2020
@nicolas-grekas nicolas-grekas changed the base branch from master to 4.3 January 13, 2020 17:23
@nicolas-grekas
Copy link
Member

Thank you @Armando-Walmeric.

nicolas-grekas added a commit that referenced this pull request Jan 13, 2020
…Armando-Walmeric)

This PR was submitted for the master branch but it was squashed and merged into the 4.3 branch instead.

Discussion
----------

[HttpClient] Fix strict parsing of response status codes

| Q             | A
| ------------- | ---
| Branch?       | 5.0
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | No ticket opened
| License       | MIT
| Doc PR        | No new feature

If you wait a strict Http code response by the server were you request, but the server response isn't strict and only return HTTP/1.1 200 we have a problem without sense to be strict on regular expression.

Commits
-------

4aa9536 [HttpClient] Fix strict parsing of response status codes
@nicolas-grekas nicolas-grekas merged commit 4aa9536 into symfony:4.3 Jan 13, 2020
@nicolas-grekas
Copy link
Member

Merged into 4.3, will come to upper branches once we merge 4.3 up.

@Armando-Torres Armando-Torres deleted the fix/httpclient-strict-response-status-codes branch January 13, 2020 17:30
This was referenced Jan 21, 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.

3 participants