Make WordPress Core

Opened 7 years ago

Last modified 14 months ago

#37708 reopened defect (bug)

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

Reported by: dd32's profile dd32 Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 4.6
Component: HTTP API Keywords:
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 (17)

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


7 years ago

#4 @desrosj
7 years ago

@rmccue do you have any suggestions here?

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


7 years ago

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


7 years ago

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


7 years ago

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


7 years ago

#10 @dd32
7 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
4 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
19 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

#13 @johnbillion
16 months ago

  • Keywords early removed

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


14 months ago

#15 @peterwilsoncc
14 months ago

Per discussion in a recent bug scrub, I am moving this off the 6.0 milestone as it depends on Requests 2.0.0 being merged.

Props @costdev, @chaion07.

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


14 months ago

#17 @costdev
14 months ago

  • Milestone changed from 6.0 to Future Release
Note: See TracTickets for help on using tickets.