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 strict parsing of response status codes #35324

Merged
merged 1 commit into from Jan 13, 2020

Conversation

@Armando-Torres
Copy link

Armando-Torres commented Jan 13, 2020

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 nicolas-grekas changed the base branch from 5.0 to master Jan 13, 2020
@nicolas-grekas

This comment has been minimized.

Copy link
Member

nicolas-grekas commented Jan 13, 2020

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 Jan 13, 2020
@nicolas-grekas

This comment has been minimized.

Copy link
Member

nicolas-grekas commented Jan 13, 2020

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
1 of 3 checks passed
1 of 3 checks passed
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
fabbot.io Your code looks good.
Details
@nicolas-grekas

This comment has been minimized.

Copy link
Member

nicolas-grekas commented Jan 13, 2020

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

@Armando-Torres Armando-Torres deleted the Armando-Torres:fix/httpclient-strict-response-status-codes branch Jan 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.