Make WordPress Core

Opened 15 years ago

Closed 15 years ago

Last modified 13 years ago

#9297 closed enhancement (fixed)

Updated List of HTTP status codes for wp_header_to_desc

Reported by: askapache's profile Askapache Owned by: askapache's profile 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 15 years ago.
functions.php.diff - update for $wp_header_to_desc

Download all attachments as: .zip

Change History (8)

@Askapache
15 years ago

functions.php.diff - update for $wp_header_to_desc

#1 @Askapache
15 years ago

  • Owner set to Askapache

#2 @azaozz
15 years ago

  • Milestone changed from Future Release to 2.8

#3 @azaozz
15 years ago

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

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

#4 @hakre
14 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.

#5 @hakre
14 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.

#6 @hakre
14 years ago

Related: #13955

#7 @hakre
13 years ago

Follow-Up: #16914

Note: See TracTickets for help on using tickets.