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

[9.x] Fixes HTTP::pool response when a URL returns a null status code #41412

Merged
merged 2 commits into from
Mar 10, 2022

Conversation

sulemaanhamza
Copy link
Contributor

This PR fixes the bug reported by sfilzek.

When we try to use HTTP::pool with a URL having an expired certificate, Guzzle returns a RequestException with a null response. I've added an extra check to make sure if the guzzle response is not null then populateResponse otherwise returns the exception.

@sulemaanhamza sulemaanhamza changed the title [9.x] Fixes HTTP::pool response when a URL returns a null status code #41360 [9.x] Fixes HTTP::pool response when a URL returns a null status code Mar 9, 2022
Co-authored-by: Bogdan Kharchenko <32746389+bogdankharchenko@users.noreply.github.com>
@shinsenter
Copy link
Contributor

@taylorotwell
I encountered a similar error as above, but the returned result was not a RequestException but a ConnectException. I think it would be best to replace the RequestException of the following code snippet with TransferException:
https://github.com/sulemaanhamza/framework/blob/20f8658355c5b1c843a61c1cdfa249f7da515841/src/Illuminate/Http/Client/PendingRequest.php#L791

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTTP::pool response returned without the PSR response when accessing a URL with an expired SSL cert.
4 participants