Opened 14 years ago
Closed 14 years ago
#13940 closed defect (bug) (invalid)
get_status_header_desc() returns HTTP 1.1 status codes for HTTP 1.0
Reported by: | hakre | Owned by: | |
---|---|---|---|
Milestone: | Priority: | low | |
Severity: | minor | Version: | 3.0 |
Component: | General | Keywords: | close |
Focuses: | Cc: |
Description
That does not work well together. I suggest adding a new parameter passing the http version to it so the return values can go conform.
Related: #9297
Attachments (9)
Change History (28)
#1
@
14 years ago
- Component changed from General to HTTP
- Priority changed from normal to low
- Severity changed from normal to minor
#2
@
14 years ago
- Component changed from HTTP to General
What set of HTTP 1.0 messages differ from those of the HTTP 1.1 set?
#3
@
14 years ago
- Resolution set to invalid
- Status changed from new to closed
The reason phrase is for humans, and as such it can be anything we want it to be. We could serve 404 OH NO and it would be fine.
The Status-Code element is a 3-digit integer result code of the attempt to understand and satisfy the request. These codes are fully defined in section 10. The Reason-Phrase is intended to give a short textual description of the Status-Code. The Status-Code is intended for use by automata and the Reason-Phrase is intended for the human user. The client is not required to examine or display the Reason- Phrase.
#5
@
14 years ago
Replying to dd32:
What set of HTTP 1.0 messages differ from those of the HTTP 1.1 set?
I'm compiling a list, I stumbled over some constraints in #9297 that's why it takes a bit longer.
Replying to markjaquith:
The reason phrase is for humans, and as such it can be anything we want it to be. We could serve 404 OH NO and it would be fine.
Serving 426 OH NO for HTTP 1.0 would not be fine.
You must not return wrong status-codes (which would invalidate the full phrase) in HTTP 1.0 nor in HTTP 1.1.
Please do not needlessly hunt it down before this ticket can stand on it's own feet. I'm still on the issue. Same @nacion. Thanks.
#6
@
14 years ago
New Headers in HTTP 1.1 compared to HTTP 1.0
- 100 : Continue
- 101 : Switching Protocols
- 203 : Non-Authoritative Information
- 205 : Reset Content
- 206 : Partial Content
- 300 : Multiple Choices
- 303 : See Other
- 305 : Use Proxy
- 307 : Temporary Redirect
- 402 : Payment Required
- 405 : Method Not Allowed
- 406 : Not Acceptable
- 407 : Proxy Authentication Required
- 408 : Request Time-out
- 409 : Conflict
- 410 : Gone
- 411 : Length Required
- 412 : Precondition Failed
- 413 : Request Entity Too Large
- 414 : Request-URI Too Large
- 415 : Unsupported Media Type
- 416 : Requested range not satisfiable
- 417 : Expectation Failed
- 504 : Gateway Time-out
- 505 : HTTP Version not supported
Changed Headers in HTTP 1.1 compared to HTTP 1.0
- 302 : Found
- HTTP 1.0: 302 : Moved Temporarily
- HTTP 1.1: 302 : Found
#7
@
14 years ago
There is no status code 306 in HTTP 1.1 or HTTP 1.0. Which version do you intend to support with WordPress?
#8
follow-up:
↓ 11
@
14 years ago
- Keywords dev-feedback added
- Milestone set to Future Release
In the end I must admit that I do not know wether or not that function should or should not return values without taking the HTTP version as well as the REQUEST METHOD into account. Next to the status code, that would be needed as context to properly find out. So thoughtfull comment by a core dev/contributer would be nice to know.
Regarding the other flaws I've found I'll create a new ticket.
#9
@
14 years ago
- Keywords dev-feedback removed
- Milestone Future Release deleted
Closed tickets don't have a milestone.
#11
in reply to:
↑ 8
@
14 years ago
- Keywords needs-patch dev-feedback added
I reopen it because the dicussion lately did fail to match the point this is about:
- How to deal with invalid Status Codes (not messages) on HTTP requests (e.g. using a non-existant status code in a HTTP/1.0 request)
- Which HTTP standard is to be supported by WordPress?
Please see this comment by me as well hakre.
#13
@
14 years ago
- Summary changed from get_status_header_desc returns HTTP 1.1 status header messages but is used for HTTP 1.0 as well to get_status_header_desc returns HTTP 1.1 status codes but is used for HTTP 1.0 as well
#14
@
14 years ago
- Summary changed from get_status_header_desc returns HTTP 1.1 status codes but is used for HTTP 1.0 as well to get_status_header_desc() returns HTTP 1.1 status codes for HTTP 1.0
#16
@
14 years ago
To reiterate what Mark said, the reason doesn't matter, and RFC 2616 (HTTP 1.1) notes this (section 6.1.1:
The Status-Code is intended for use by automata and the Reason-Phrase is intended for the human user. The client is not required to examine or display the Reason-Phrase.
[...]
The individual values of the numeric status codes defined for HTTP/1.1, and an example set of corresponding Reason-Phrase's, are presented below. The reason phrases listed here are only recommendations -- they MAY be replaced by local equivalents without affecting the protocol.
(Emphasis mine)
I won't close this, as I feel it's not my place to do so in this case.
#17
@
14 years ago
To rephrase what I wrote in response to Mark, emphasis by me:
Replying to hakre:
Replying to markjaquith:
You must not return wrong status-codes (which would invalidate the full phrase) in HTTP 1.0 nor in HTTP 1.1.
As you can see I'm writing about codes, not phrases. This is the same for the title of this ticket.
HTTP 1.0 Status Code and Reason Phrase