Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[HttpClient] Psr18Client: parse HTTP Reason Phrase for Response#52329
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
carsonbot commentedOct 27, 2023
Hey! I see that this is your first PR. That is great! Welcome! Symfony has acontribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
carsonbot commentedOct 27, 2023
Hey! Thanks for your PR. You are targeting branch "6.4" but it seems your PR description refers to branch "6.4 for features / 5.4 or 6.3 for bug fixes". Cheers! Carsonbot |
carsonbot commentedOct 27, 2023
It looks like you unchecked the "Allow edits from maintainer" box. That is fine, but please note that if you have multiple commits, you'll need to squash your commits into one before this can be merged. Or, you can check the "Allow edits from maintainers" box and the maintainer can squash for you. Cheers! Carsonbot |
stof commentedOct 27, 2023
How does this behave when the actual request is done with HTTP/2, which does not transmit a reason phrase ? |
Hanmac commentedOct 27, 2023
the Regex shouldn't find any, and then return nothing, and then the factory should fallback to the old one |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
nicolas-grekas left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks for the PR, here are some comments.
I thinkHttplugClient might need the same, can you have a look?
Co-authored-by: Nicolas Grekas <nicolas.grekas@gmail.com>
Hanmac commentedOct 27, 2023
Where can I check this right now? I didn't saw it when making this MR |
stof commentedOct 27, 2023
I'm not sure this checkbox exists for PRs sent from a fork owned by an organization instead of a user. |
Hanmac commentedOct 28, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
i probably need to do some trickery with while the Response class allows the Reason Phase to be null (and falls back to the hard codes ones, MAYBE) so i probably need to do something like: $responseParameters = [$response->getStatusCode()];if ($phrase =$this->getReasonPhrase($response)) {$responseParameters []=$phrase;}$psrResponse =$this->responseFactory->createResponse(...$responseParameters); i need to try this after weekend |
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Alexander M. Turek <me@derrabus.de>
derrabus left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This test failure appears to be related.
1)Symfony\Component\HttpClient\Tests\Psr18ClientTest::testInvalidHeaderResponseTypeError:Http\Discovery\Psr17Factory::createResponse(): Argument#2 ($reasonPhrase) must be of type string, null given, called in /home/runner/work/symfony/symfony/src/Symfony/Component/HttpClient/Psr18Client.php on line 109/home/runner/work/symfony/symfony/vendor/php-http/discovery/src/Psr17Factory.php:84/home/runner/work/symfony/symfony/src/Symfony/Component/HttpClient/Psr18Client.php:109/home/runner/work/symfony/symfony/src/Symfony/Component/HttpClient/Tests/Psr18ClientTest.php:101
Hanmac commentedOct 28, 2023
That's why I said I need to at this maybe after weekend |
Hanmac commentedOct 28, 2023
took my laptop to work on this thing ... see my idea above with the variable parameters |
Uh oh!
There was an error while loading.Please reload this page.
Hanmac commentedOct 29, 2023
The last failures seems to be unrelated? |
nicolas-grekas commentedOct 29, 2023
Thank you@Hanmac. |
…ponse (Hanmac)This PR was submitted for the 6.4 branch but it was squashed and merged into the 5.4 branch instead.Discussion----------[HttpClient] Psr18Client: parse HTTP Reason Phrase for Response| Q | A| ------------- | ---| Branch? | 6.4| Bug fix? | yes| New feature? | no| Deprecations? | no| Issues |Fix#51527| License | MITCommits-------115a5a1 [HttpClient] Psr18Client: parse HTTP Reason Phrase for Response
nicolas-grekas commentedOct 29, 2023
Merged as115a5a1 in 5.4 |
GrahamCampbell commentedOct 29, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Edits were not possible because it was forked to an organization account. |
Uh oh!
There was an error while loading.Please reload this page.