Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#34131 closed enhancement (fixed)

Add support for HTTP/2 to status_header()

Reported by: johnbillion's profile johnbillion Owned by: wonderboymusic's profile wonderboymusic
Milestone: 4.4 Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch
Focuses: Cc:

Description

The status_header() function only outputs one of HTTP/1.0 {status} or HTTP/1.1 {status} based on the requested protocol in $_SERVER['SERVER_PROTOCOL'].

This function should also support HTTP/2 and HTTP/2.0 (Nginx trunk is currently using HTTP/2.0 which I'm not sure is correct).

In addition, $_SERVER['SERVER_PROTOCOL'] is used in three other places in core, so these should be updated too.

Attachments (2)

34131.diff (1.8 KB) - added by johnbillion 9 years ago.
34131.2.diff (2.7 KB) - added by wonderboymusic 9 years ago.

Download all attachments as: .zip

Change History (6)

@johnbillion
9 years ago

#1 @johnbillion
9 years ago

  • Keywords has-patch added

#2 @wonderboymusic
9 years ago

any benefit to adding a wrapper func?

#4 @wonderboymusic
9 years ago

  • Owner set to wonderboymusic
  • Resolution set to fixed
  • Status changed from new to closed

In 34894:

Introduce wp_get_server_protocol() to DRY protocol parsing logic and make adding more protocols, like HTTP/2, easier.

Props johnbillion, wonderboymusic.
Fixes #34131.

Note: See TracTickets for help on using tickets.