WordPress.org

Make WordPress Core

Opened 3 weeks ago

Closed 3 weeks ago

Last modified 3 weeks ago

#54404 closed defect (bug) (fixed)

Incorrect protocol with HTTP/3

Reported by: malthert Owned by: davidbaumwald
Milestone: 5.9 Priority: normal
Severity: normal Version:
Component: Bootstrap/Load Keywords: good-first-bug has-patch commit
Focuses: Cc:

Description

wp-includes/load.php

function wp_get_server_protocol:

<?php
if ( ! in_array( $protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0' ), true ) ) {
        $protocol = 'HTTP/1.0';

Chrome Carnary already supports HTTP/3 (since a long time), so this should be fixed as it returns the incorrect protocol.

Change History (9)

#1 @johnbillion
3 weeks ago

  • Keywords needs-patch good-first-bug added
  • Milestone changed from Awaiting Review to Future Release
  • Version trunk deleted

This ticket was mentioned in PR #1848 on WordPress/wordpress-develop by kkmuffme.


3 weeks ago

  • Keywords has-patch added; needs-patch removed

#3 @malthert
3 weeks ago

  • Keywords needs-patch added; has-patch removed

@johnbillion added the pull request, please merge.

#4 @malthert
3 weeks ago

  • Keywords has-patch added; needs-patch removed

#5 @SergeyBiryukov
3 weeks ago

  • Milestone changed from Future Release to 5.9

Per the Wikipedia article on HTTP/3:

As of November 2021, the HTTP/3 protocol is still officially an Internet Draft, but is already supported by 74% of running web browsers and, according to W3Techs, 23% of the top 10 million websites. It has been supported by Google Chrome (including Chrome for Android, and Microsoft Edge, which is based on it) since April 2020 and by Mozilla Firefox since May 2021. Safari 14 (on macOS Big Sur and iOS 14) has also implemented the protocol but support is hidden behind a feature flag.

Seems like a good fit for 5.9.

#6 @mukesh27
3 weeks ago

  • Keywords commit added

PR looks good to me.

Mark as commit

#7 @davidbaumwald
3 weeks ago

  • Owner set to davidbaumwald
  • Status changed from new to reviewing

#8 @davidbaumwald
3 weeks ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 52087:

Bootstrap/Load: Add HTTP/3 as a valid HTTP protocol.

As of November 2021, the HTTP/3 protocol is still officially an Internet Draft, but is already supported by 74% of running web browsers and, according to W3Techs, 23% of the top 10 million websites. It has been supported by Google Chrome (including Chrome for Android, and Microsoft Edge, which is based on it) since April 2020 and by Mozilla Firefox since May 2021. Safari 14 (on macOS Big Sur and iOS 14) has also implemented the protocol but support is hidden behind a feature flag.

Based on the wide support, this change adds HTTP/3 as a valid HTTP protocol.

Props malthert.
Fixes #54404.

Note: See TracTickets for help on using tickets.