-
Notifications
You must be signed in to change notification settings - Fork 268
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
Network access error stream_socket_client() ssl://... Host is unreachable #1047
Comments
After looking into this, from what I can tell, the To me, it appears that it's no longer possible to disable the curl/streams handlers in Requests, I actually suspect it might not have been possible to disable them previously either; but because the I'm not seeing a filter in Requests to specify the transport to use either: I suspect, the way forward is to get a filter into the Requests class; or have playground overwrite/modify the Example: |
I think I found a workaround.. there is a generic filter that let's us change some of the basic Requests args, and it includes an option we can use to force a specific transport to be used:
Here's a request with, and without the above filter: |
Note I've merged a reflections-based fix around the same time this issue was reported, but I think @dd32's PR is a more elegant solution and I'd love to move forward with that one instead. |
As the 'http_api_transports' filter is deprecated and no longer actively used, this filters the Requests library to always use the Fetch transport. ## What problem is it solving? When the kitchen sink is enabled (ie. streams extension) Requests is using that for HTTP requests, rather than using the Fetch transport (and does not automatically fallback to it). ## How is the problem addressed? Filters the Requests internals to always use the transport. ## Testing Instructions 1. Load with kitchen sink 2. Observe failing requests, and no attempt to use Fetch 3. Apply Patch 4. Load with kitchen sink 5. Observe requests succeed (or fail with CORS issues via fetch). Fixes #1047 --------- Co-authored-by: Adam Zieliński <adam@adamziel.com>
Some network access fails with a ssl stream error when running with
kitchen-sink
extensions and networking enabled.For example, on the Dashboard page, the Events widget shows this error:
The browser never actually attempts to make this particular request; something is going wrong either in PHP or the WP HTTP code.
Steps to reproduce:
Expected: either the request should succeed, or the limitation should be documented if this is intended behaviour.
The text was updated successfully, but these errors were encountered: