Make WordPress Core

Opened 5 years ago

Last modified 3 years ago

#53513 assigned defect (bug)

WP_Http ignores httpversion option

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

Description

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 (4)

#1 @ocean90
5 years ago

  • Keywords needs-patch added
  • Milestone Awaiting ReviewFuture Release
  • Version 5.7.24.6

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


5 years ago
#2

  • 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

#3 @chesio
4 years ago

Hi @ocean90, is there anything else I can do in order to get the PR merged? It's a simple fix and unit tests are included...

#4 @jonte98
3 years ago

It would be so great if HTTP 2.0 and 3.0 was added.

Or if the bug was addressed.

I mean, it's better performance and security in HTTP/2 and HTTP/3.

Most malicious traffic operate on 1.0 and 1.1...

Note: See TracTickets for help on using tickets.