[wp-trac] [WordPress Trac] #37708: `wp_http_supports()` doesn't reflect what Requests can do
WordPress Trac
noreply at wordpress.org
Tue Jun 11 05:22:58 UTC 2024
#37708: `wp_http_supports()` doesn't reflect what Requests can do
--------------------------+-----------------------------
Reporter: dd32 | Owner: (none)
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: Future Release
Component: HTTP API | Version: 4.6
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+-----------------------------
Comment (by dd32):
8 years later, this is causing some issues with WordPress playground,
which uses a custom fetch transport.
https://github.com/WordPress/wordpress-playground/issues/1494
After doing some digging with the aid of wpdirectory.net I've been unable
to find any instances of wp_http_supports() usage which looking for a
capability other than `ssl`, which is good, because we (WP_HTTP &
Requests) don't support anything else here :)
The only instance I could find that was not looking for SSL was code
similar to this:
{{{
if ( wp_http_supports( array(), 'http://www.example.com/' ) ) { ... }
}}}
The attached PR implements option 1 from the ticket, using the Requests v2
method.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37708#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list