Make WordPress Core

Opened 7 months ago

Last modified 9 days ago

#53513 assigned defect (bug)

WP_Http ignores httpversion option

Reported by: cocreation Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 4.6
Component: HTTP API Keywords: has-patch has-unit-tests
Focuses: Cc:


WP_Http::request() uses the httpversion argument, which the documentation says will set the HTTP protocol version of the request.

However when it calls Requests::request(), the httpversion option is never passed. Instead, it uses protocol_version, as seen in Requests::get_default_options().

Yet there is no way to set protocol_version, and it always defaults to 1.1.

It seems that httpversion is not actually used anywhere, and should be updated to protocol_version.

Change History (2)

#1 @ocean90
12 days ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release
  • Version changed from 5.7.2 to 4.6

This ticket was mentioned in PR #2145 on WordPress/wordpress-develop by chesio.

9 days ago

  • Keywords has-patch has-unit-tests added; needs-patch removed

Use proper option name when setting HTTP protocol version for external request made by Requests library. Include unit tests that fail on current trunk and pass when this PR is applied.

Trac ticket: https://core.trac.wordpress.org/ticket/53513

Note: See TracTickets for help on using tickets.