-
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
Filter Requests library to use the Fetch handler. #1048
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Surfacing this comment: #1047 (comment) |
adamziel
added
[Type] Bug
An existing feature does not function as intended
[Aspect] Networking
labels
Mar 13, 2024
adamziel
force-pushed
the
fix/1047-with-kitchensink-enabled
branch
from
April 16, 2024 20:19
873bcb2
to
6b7462a
Compare
I rebased and adjusted this PR, we should stop seeing the console warnings about the |
brandonpayton
pushed a commit
that referenced
this pull request
Jun 17, 2024
…-sink extension bundle. (#1504) Fixes #1494 In #1048 I introduced a regression of #819, in that `wp_http_supports( [ 'ssl' ] )` no longer returned truthful without the kitchen-sink extension bundle loaded. This partially reverts #1048 by keeping the filters for Requests, but reinstating the deprecated WP_HTTP filters. It's worth noting, that this is not a direct revert, as it forces the Fetch/Dummy handlers instead of simply adding them as an option. This is to match the Requests filter behaviour. To test this, the following blueprint should land you on a plugin install page without any errors visible: https://playground.wordpress.net/#{%22phpExtensionBundles%22:[%22light%22],%22features%22:{%22networking%22:true},%22landingPage%22:%22/wp-admin/plugin-install.php%22,%22steps%22:[{%22step%22:%22login%22,%22username%22:%22admin%22,%22password%22:%22password%22}]} ``` { "phpExtensionBundles": [ "light" ], "features": { "networking": true }, "landingPage": "/wp-admin/plugin-install.php", "steps": [ { "step": "login", "username": "admin", "password": "password" } ] } ```
bgrgicak
pushed a commit
that referenced
this pull request
Jun 20, 2024
…-sink extension bundle. (#1504) Fixes #1494 In #1048 I introduced a regression of #819, in that `wp_http_supports( [ 'ssl' ] )` no longer returned truthful without the kitchen-sink extension bundle loaded. This partially reverts #1048 by keeping the filters for Requests, but reinstating the deprecated WP_HTTP filters. It's worth noting, that this is not a direct revert, as it forces the Fetch/Dummy handlers instead of simply adding them as an option. This is to match the Requests filter behaviour. To test this, the following blueprint should land you on a plugin install page without any errors visible: https://playground.wordpress.net/#{%22phpExtensionBundles%22:[%22light%22],%22features%22:{%22networking%22:true},%22landingPage%22:%22/wp-admin/plugin-install.php%22,%22steps%22:[{%22step%22:%22login%22,%22username%22:%22admin%22,%22password%22:%22password%22}]} ``` { "phpExtensionBundles": [ "light" ], "features": { "networking": true }, "landingPage": "/wp-admin/plugin-install.php", "steps": [ { "step": "login", "username": "admin", "password": "password" } ] } ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is this PR doing?
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
Fixes #1047