Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#54404 closed defect (bug) (fixed)

Incorrect protocol with HTTP/3

Reported by: malthert's profile malthert Owned by: davidbaumwald's profile 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
2 years 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.


2 years ago
#2

  • Keywords has-patch added; needs-patch removed

#3 @malthert
2 years ago

  • Keywords needs-patch added; has-patch removed

@johnbillion added the pull request, please merge.

#4 @malthert
2 years ago

  • Keywords has-patch added; needs-patch removed

#5 @SergeyBiryukov
2 years 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
2 years ago

  • Keywords commit added

PR looks good to me.

Mark as commit

#7 @davidbaumwald
2 years ago

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

#8 @davidbaumwald
2 years 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.

dream-encode commented on PR #1848:


2 years ago
#9

Committed to core via changeset https://core.trac.wordpress.org/changeset/52087

Note: See TracTickets for help on using tickets.