WordPress.org

Make WordPress Core

Opened 15 months ago

Last modified 13 months ago

#37708 new defect (bug)

`wp_http_supports()` doesn't reflect what Requests can do

Reported by: dd32 Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 4.6
Component: HTTP API Keywords: needs-patch early
Focuses: Cc:

Description

While reviewing what parts of WP_HTTP can be removed in #37705, I noticed that wp_http_supports() still performs it's checks against the WP_HTTP transports rather than querying against Requests to see if the request can be performed or not.

The only capability which we supported was ssl.

Three options:

  1. Query SSL ability against Requests (if it supports that)
  2. Deprecate and always return true;
  3. Implement a small check to see if SSL requests will be able to proceed, checking for cURL features or openssl being available (and all the other streams requirements being satisfied).

The above options are in my order of preferences, we should support it if possible, but I'm not afraid of just no-oping the function.

Marking for 4.7, with the potential for 4.6.x backporting.

Change History (10)

#1 @jorbin
15 months ago

I like the first option, though a quick look through Requests makes me think it doesn't have that functionality. @rmccue - Does that sound correct?

#2 @dd32
15 months ago

I couldn't see anything in Requests that we could use, but I also feel that adding a method for checking to see if we can *maybe* support SSL wouldn't be out of the question..

This ticket was mentioned in Slack in #core by desrosj. View the logs.


14 months ago

#4 @desrosj
14 months ago

@rmccue do you have any suggestions here?

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


13 months ago

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


13 months ago

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


13 months ago

This ticket was mentioned in Slack in #core by helen. View the logs.


13 months ago

#10 @dd32
13 months ago

  • Keywords early added
  • Milestone changed from 4.7 to Future Release

Punting, it was broken in 4.6, mostly works still as long as the majority of the WP_HTTP logic remains in sync with Requests (which it is at present).

Note: See TracTickets for help on using tickets.