WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 3 years ago

#9297 closed enhancement (fixed)

Updated List of HTTP status codes for wp_header_to_desc

Reported by: Askapache Owned by: Askapache
Milestone: 2.8 Priority: low
Severity: trivial Version: 2.8
Component: HTTP API Keywords: has-patch, tested
Focuses: Cc:

Description

Updated the list of HTTP Status Code Header Descriptions stored in the global variable $wp_header_to_desc used by the functions status_header and get_status_header_desc to include a few missing codes for 100% compliance with HTTP 1.1 protocol.

Reference

Attachments (1)

functions.php.diff (1.5 KB) - added by Askapache 5 years ago.
functions.php.diff - update for $wp_header_to_desc

Download all attachments as: .zip

Change History (8)

Askapache5 years ago

functions.php.diff - update for $wp_header_to_desc

comment:1 Askapache5 years ago

  • Owner set to Askapache

comment:2 azaozz5 years ago

  • Milestone changed from Future Release to 2.8

comment:3 azaozz5 years ago

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

(In [10740]) Updated List of HTTP status codes, props Askapache, fixes #9297

comment:4 hakre4 years ago

It's nice to have HTTP 1.1 compability, but that function is used for responses to HTTP 1.0 requests as well. I opened a new ticket because of that: #13940.

comment:5 hakre4 years ago

Another flaw with this patch:

There is no 306 status code in HTTP 1.1. More details in section 10.3.7 306 (Unused):

The 306 status code was used in a previous version of the
specification, is no longer used, and the code is reserved.

So this function MUST return an empty string for 306 for both HTTP 1.0 and HTTP 1.1 (that's the two HTTP versions wordpress currently supports).

The previous version was an Internet-Draft by Josh Cohen from Netscape Communications Corp. dated 5 December 1996 and entitled "HTTP/1.1 305 and 306 Response Codes", filename <draft-cohen-http-305-306-responses-00.txt>. It's a draft. It never made it into HTTP 1.1 and it never was in HTTP 1.0.

I will not re-open this ticket because it's for an older version. I put this information here for documentation purposes.

There are other Headers from HTTP 1.1 extenstions like WEBDAV that I should go through as well. Let's see what that turns out.

comment:6 hakre4 years ago

Related: #13955

comment:7 hakre3 years ago

Follow-Up: #16914

Note: See TracTickets for help on using tickets.