Make WordPress Core

Opened 5 years ago

Last modified 2 months ago

#37708 reopened defect (bug)

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

Reported by: dd32 Owned by:
Milestone: 6.0 Priority: normal
Severity: normal Version: 4.6
Component: HTTP API Keywords: 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 (12)

#1 @jorbin
5 years 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
5 years 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.


5 years ago

#4 @desrosj
5 years ago

@rmccue do you have any suggestions here?

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


5 years ago

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


5 years ago

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


5 years ago

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


5 years ago

#10 @dd32
5 years 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).

#11 @desrosj
3 years ago

  • Keywords needs-patch removed
  • Milestone Future Release deleted
  • Resolution set to reported-upstream
  • Status changed from new to closed

I’m going to close this out as reported upstream. When Requests is updated and the PR above is merged, this will make its way in.

#12 @jrf
2 months ago

  • Milestone set to 6.0
  • Resolution reported-upstream deleted
  • Status changed from closed to reopened

Requests 2.0.0 has been released and includes the change needed to address this.

The update to Requests 2.0.0 is expected to still go into WP 5.9. Once the upgrade patch has been merged, we should be able to address this ticket with relative ease.

Related: #54504

Note: See TracTickets for help on using tickets.