This commit is contained in:
Samuel Ryan 2012-08-12 00:40:52 +01:00
parent 4fdaaa7201
commit 7383bb06bd
2 changed files with 561 additions and 2 deletions

559
codes/4.json Normal file
View File

@ -0,0 +1,559 @@
{
"class":{
"title":"Client Error",
"class":"4"
},
"codes":{
"400":{
"code":"400",
"title":"Bad Request",
"summary":"request cannot be fulfilled due to bad syntax",
"descriptions":{
"wikipedia":{
"body":"The request cannot be fulfilled due to bad syntax.",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#400"
},
"ietf":{
"body":"The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.",
"link":"http:\/\/www.ietf.org\/rfc\/rfc2616.txt"
}
},
"references":{
"rails":{
"title":"Rails HTTP Status Symbol",
"value":":bad_request"
}
}
},
"401":{
"code":"401",
"title":"Unauthorized",
"summary":"authentication is possible but has failed ",
"descriptions":{
"wikipedia":{
"body":"Similar to 403 Forbidden, but specifically for use when authentication is possible but has failed or not yet been provided. The response must include a WWW-Authenticate header field containing a challenge applicable to the requested resource. See Basic access authentication and Digest access authentication.",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#401"
},
"ietf":{
"body":"The request requires user authentication. The response MUST include a WWW-Authenticate header field containing a challenge applicable to the requested resource. The client MAY repeat the request with a suitable Authorization header field. If the request already included Authorization credentials, then the 401 response indicates that authorization has been refused for those credentials. If the 401 response contains the same challenge as the prior response, and the user agent has already attempted authentication at least once, then the user SHOULD be presented the entity that was given in the response, since that entity might include relevant diagnostic information. HTTP access authentication is explained in \"HTTP Authentication: Basic and Digest Access Authentication\".",
"link":"http:\/\/www.ietf.org\/rfc\/rfc2616.txt"
}
},
"references":{
"rails":{
"title":"Rails HTTP Status Symbol",
"value":":unauthorised"
}
}
},
"402":{
"code":"402",
"title":"Payment Required",
"summary":"payment required, reserved for future use",
"descriptions":{
"wikipedia":{
"body":"Reserved for future use. The original intention was that this code might be used as part of some form of digital cash or micropayment scheme, but that has not happened, and this code is not usually used. As an example of its use, however, Apple's MobileMe service generates a 402 error (\"httpStatusCode:402\" in the Mac OS X Console log) if the MobileMe account is delinquent.",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#402"
},
"ietf":{
"body":"This code is reserved for future use.",
"link":"http:\/\/www.ietf.org\/rfc\/rfc2616.txt"
}
},
"references":{
"rails":{
"title":"Rails HTTP Status Symbol",
"value":":payment_required"
}
}
},
"403":{
"code":"403",
"title":"Forbidden",
"summary":"server refuses to respond to request",
"descriptions":{
"wikipedia":{
"body":"The request was a legal request, but the server is refusing to respond to it. Unlike a 401 Unauthorized response, authenticating will make no difference.",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#403"
},
"ietf":{
"body":"The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated. If the request method was not HEAD and the server wishes to make public why the request has not been fulfilled, it SHOULD describe the reason for the refusal in the entity. If the server does not wish to make this information available to the client, the status code 404 (Not Found) can be used instead.",
"link":"http:\/\/www.ietf.org\/rfc\/rfc2616.txt"
}
},
"references":{
"rails":{
"title":"Rails HTTP Status Symbol",
"value":":forbidden"
}
}
},
"404":{
"code":"404",
"title":"Not Found",
"summary":"requested resource could not be found",
"descriptions":{
"wikipedia":{
"body":"The requested resource could not be found but may be available again in the future. Subsequent requests by the client are permissible.",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#404"
},
"ietf":{
"body":"The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.",
"link":"http:\/\/www.ietf.org\/rfc\/rfc2616.txt"
}
},
"references":{
"rails":{
"title":"Rails HTTP Status Symbol",
"value":":not_found"
}
}
},
"405":{
"code":"405",
"title":"Method Not Allowed",
"summary":"request method not supported by that resource",
"descriptions":{
"wikipedia":{
"body":"A request was made of a resource using a request method not supported by that resource; for example, using GET on a form which requires data to be presented via POST, or using PUT on a read-only resource.",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#405"
},
"ietf":{
"body":"The method specified in the Request-Line is not allowed for the resource identified by the Request-URI. The response MUST include an Allow header containing a list of valid methods for the requested resource.",
"link":"http:\/\/www.ietf.org\/rfc\/rfc2616.txt"
}
},
"references":{
"rails":{
"title":"Rails HTTP Status Symbol",
"value":":method_not_allowed"
}
}
},
"406":{
"code":"406",
"title":"Not Acceptable",
"summary":"content not acceptable according to the Accept headers",
"descriptions":{
"wikipedia":{
"body":"The requested resource is only capable of generating content not acceptable according to the Accept headers sent in the request.",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#406"
},
"ietf":{
"body":"The resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headers sent in the request.\r\nUnless it was a HEAD request, the response SHOULD include an entity containing a list of available entity characteristics and location(s) from which the user or user agent can choose the one most appropriate. The entity format is specified by the media type given in the Content-Type header field. Depending upon the format and the capabilities of the user agent, selection of the most appropriate choice MAY be performed automatically. However, this specification does not define any standard for such automatic selection.\r\nNote: HTTP\/1.1 servers are allowed to return responses which are not acceptable according to the accept headers sent in the request. In some cases, this may even be preferable to sending a 406 response. User agents are encouraged to inspect the headers of an incoming response to determine if it is acceptable.\r\nIf the response could be unacceptable, a user agent SHOULD temporarily stop receipt of more data and query the user for a decision on further actions.",
"link":"http:\/\/www.ietf.org\/rfc\/rfc2616.txt"
}
},
"references":{
"rails":{
"title":"Rails HTTP Status Symbol",
"value":":not_acceptable"
}
}
},
"407":{
"code":"407",
"title":"Proxy Authentication Required",
"summary":"client must first authenticate itself with the proxy",
"descriptions":{
"wikipedia":{
"body":"The client must first authenticate itself with the proxy.",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#407"
},
"ietf":{
"body":"This code is similar to 401 (Unauthorized), but indicates that the client must first authenticate itself with the proxy. The proxy MUST return a Proxy-Authenticate header field containing a challenge applicable to the proxy for the requested resource. The client MAY repeat the request with a suitable Proxy-Authorization header field. HTTP access authentication is explained in \"HTTP Authentication: Basic and Digest Access Authentication\".",
"link":"http:\/\/www.ietf.org\/rfc\/rfc2616.txt"
}
},
"references":{
"rails":{
"title":"Rails HTTP Status Symbol",
"value":":proxy_authentication_required"
}
}
},
"408":{
"code":"408",
"title":"Request Timeout",
"summary":"server timed out waiting for the request",
"descriptions":{
"wikipedia":{
"body":"The server timed out waiting for the request. According to W3 HTTP specifications: \"The client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at any later time.\"",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#408"
},
"ietf":{
"body":"The client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at any later time.",
"link":"http:\/\/www.ietf.org\/rfc\/rfc2616.txt"
}
},
"references":{
"rails":{
"title":"Rails HTTP Status Symbol",
"value":":request_timeout"
}
}
},
"409":{
"code":"409",
"title":"Conflict",
"summary":"request could not be processed because of conflict",
"descriptions":{
"wikipedia":{
"body":"Indicates that the request could not be processed because of conflict in the request, such as an edit conflict.",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#409"
},
"ietf":{
"body":"The request could not be completed due to a conflict with the current state of the resource. This code is only allowed in situations where it is expected that the user might be able to resolve the conflict and resubmit the request. The response body SHOULD include enough information for the user to recognize the source of the conflict. Ideally, the response entity would include enough information for the user or user agent to fix the problem; however, that might not be possible and is not required.\r\nConflicts are most likely to occur in response to a PUT request. For example, if versioning were being used and the entity being PUT included changes to a resource which conflict with those made by an earlier (third-party) request, the server might use the 409 response to indicate that it can't complete the request. In this case, the response entity would likely contain a list of the differences between the two versions in a format defined by the response Content-Type.",
"link":"http:\/\/www.ietf.org\/rfc\/rfc2616.txt"
}
},
"references":{
"rails":{
"title":"Rails HTTP Status Symbol",
"value":":conflict"
}
}
},
"410":{
"code":"410",
"title":"Gone",
"summary":"resource is no longer available and will not be available again",
"descriptions":{
"wikipedia":{
"body":"Indicates that the resource requested is no longer available and will not be available again. This should be used when a resource has been intentionally removed and the resource should be purged. Upon receiving a 410 status code, the client should not request the resource again in the future. Clients such as search engines should remove the resource from their indices. Most use cases do not require clients and search engines to purge the resource, and a \"404 Not Found\" may be used instead.",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#410"
},
"ietf":{
"body":"The requested resource is no longer available at the server and no forwarding address is known. This condition is expected to be considered permanent. Clients with link editing capabilities SHOULD delete references to the Request-URI after user approval. If the server does not know, or has no facility to determine, whether or not the condition is permanent, the status code 404 (Not Found) SHOULD be used instead. This response is cacheable unless indicated otherwise.\r\nThe 410 response is primarily intended to assist the task of web maintenance by notifying the recipient that the resource is intentionally unavailable and that the server owners desire that remote links to that resource be removed. Such an event is common for limited-time, promotional services and for resources belonging to individuals no longer working at the server's site. It is not necessary to mark all permanently unavailable resources as \"gone\" or to keep the mark for any length of time -- that is left to the discretion of the server owner.",
"link":"http:\/\/www.ietf.org\/rfc\/rfc2616.txt"
}
},
"references":{
"rails":{
"title":"Rails HTTP Status Symbol",
"value":":gone"
}
}
},
"411":{
"code":"411",
"title":"Length Required",
"summary":"request did not specify the length of its content",
"descriptions":{
"wikipedia":{
"body":"The request did not specify the length of its content, which is required by the requested resource.",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#411"
},
"ietf":{
"body":"The server refuses to accept the request without a defined Content- Length. The client MAY repeat the request if it adds a valid Content-Length header field containing the length of the message-body in the request message.",
"link":"http:\/\/www.ietf.org\/rfc\/rfc2616.txt"
}
},
"references":{
"rails":{
"title":"Rails HTTP Status Symbol",
"value":":length_required"
}
}
},
"412":{
"code":"412",
"title":"Precondition Failed",
"summary":"server does not meet request preconditions",
"descriptions":{
"wikipedia":{
"body":"The server does not meet one of the preconditions that the requester put on the request.",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#412"
},
"ietf":{
"body":"The precondition given in one or more of the request-header fields evaluated to false when it was tested on the server. This response code allows the client to place preconditions on the current resource metainformation (header field data) and thus prevent the requested method from being applied to a resource other than the one intended.",
"link":"http:\/\/www.ietf.org\/rfc\/rfc2616.txt"
}
},
"references":{
"rails":{
"title":"Rails HTTP Status Symbol",
"value":":precondition_failed"
}
}
},
"413":{
"code":"413",
"title":"Request Entity Too Large",
"summary":"request is larger than the server is willing or able to process",
"descriptions":{
"wikipedia":{
"body":"The request is larger than the server is willing or able to process.",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#413"
},
"ietf":{
"body":"The server is refusing to process a request because the request entity is larger than the server is willing or able to process. The server MAY close the connection to prevent the client from continuing the request.\r\nIf the condition is temporary, the server SHOULD include a Retry- After header field to indicate that it is temporary and after what time the client MAY try again.",
"link":"http:\/\/www.ietf.org\/rfc\/rfc2616.txt"
}
},
"references":{
"rails":{
"title":"Rails HTTP Status Symbol",
"value":":request_entity_too_large"
}
}
},
"414":{
"code":"414",
"title":"Request-URI Too Long",
"summary":"URI provided was too long for the server to process",
"descriptions":{
"wikipedia":{
"body":"The URI provided was too long for the server to process.",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#414"
},
"ietf":{
"body":"The server is refusing to service the request because the Request-URI is longer than the server is willing to interpret. This rare condition is only likely to occur when a client has improperly converted a POST request to a GET request with long query information, when the client has descended into a URI \"black hole\" of redirection (e.g., a redirected URI prefix that points to a suffix of itself), or when the server is under attack by a client attempting to exploit security holes present in some servers using fixed-length buffers for reading or manipulating the Request-URI.",
"link":"http:\/\/www.ietf.org\/rfc\/rfc2616.txt"
}
},
"references":{
"rails":{
"title":"Rails HTTP Status Symbol",
"value":":request_uri_too_long"
}
}
},
"415":{
"code":"415",
"title":"Unsupported Media Type",
"summary":"server does not support media type",
"descriptions":{
"wikipedia":{
"body":"The request entity has a media type which the server or resource does not support. For example, the client uploads an image as image\/svg+xml, but the server requires that images use a different format.",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#415"
},
"ietf":{
"body":"The server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method.",
"link":"http:\/\/www.ietf.org\/rfc\/rfc2616.txt"
}
},
"references":{
"rails":{
"title":"Rails HTTP Status Symbol",
"value":":unsupported_media_type"
}
}
},
"416":{
"code":"416",
"title":"Requested Range Not Satisfiable",
"summary":"client has asked for unprovidable portion of the file",
"descriptions":{
"wikipedia":{
"body":"The client has asked for a portion of the file, but the server cannot supply that portion. For example, if the client asked for a part of the file that lies beyond the end of the file.",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#416"
},
"ietf":{
"body":"A server SHOULD return a response with this status code if a request included a Range request-header field, and none of the range-specifier values in this field overlap the current extent of the selected resource, and the request did not include an If-Range request-header field. (For byte-ranges, this means that the first- byte-pos of all of the byte-range-spec values were greater than the current length of the selected resource.)\r\nWhen this status code is returned for a byte-range request, the response SHOULD include a Content-Range entity-header field specifying the current length of the selected resource. This response MUST NOT use the multipart\/byteranges content- type.",
"link":"http:\/\/www.ietf.org\/rfc\/rfc2616.txt"
}
},
"references":{
"rails":{
"title":"Rails HTTP Status Symbol",
"value":":requested_range_not_satisfiable"
}
}
},
"417":{
"code":"417",
"title":"Expectation Failed",
"summary":"server cannot meet requirements of Expect request-header field",
"descriptions":{
"wikipedia":{
"body":"The server cannot meet the requirements of the Expect request-header field.",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#417"
},
"ietf":{
"body":"The expectation given in an Expect request-header field could not be met by this server, or, if the server is a proxy, the server has unambiguous evidence that the request could not be met by the next-hop server.",
"link":"http:\/\/www.ietf.org\/rfc\/rfc2616.txt"
}
},
"references":{
"rails":{
"title":"Rails HTTP Status Symbol",
"value":":expectation_failed"
}
}
},
"418":{
"code":"418",
"title":"I'm a teapot (RFC 2324)",
"summary":"I'm a teapot",
"descriptions":{
"wikipedia":{
"body":"This code was defined in 1998 as one of the traditional IETF April Fools' jokes, in RFC 2324, Hyper Text Coffee Pot Control Protocol, and is not expected to be implemented by actual HTTP servers. However, known implementations do exist. An Nginx HTTP server uses this code to simulate goto-like behaviour in its configuration.",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#418"
}
},
"references":{
"rails":{
"title":"Rails HTTP Status Symbol",
"value":":\"i'm_a_teapot\" <small>(<a href=\"https://gist.github.com/3134563\">explanation<\/a> <sup>gist.github.com<\/sup>)<\/small>"
}
}
},
"420":{
"code":"420",
"title":"Enhance Your Calm",
"summary":"Twitter rate limiting",
"descriptions":{
"wikipedia":{
"body":"Returned by the Twitter Search and Trends API when the client is being rate limited.",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#420"
}
}
},
"422":{
"code":"422",
"title":"Unprocessable Entity (WebDAV) (RFC 4918)",
"summary":"request unable to be followed due to semantic errors",
"descriptions":{
"wikipedia":{
"body":"The request was well-formed but was unable to be followed due to semantic errors.",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#422"
}
},
"references":{
"rails":{
"title":"Rails HTTP Status Symbol",
"value":":unprocessable_entity"
}
}
},
"423":{
"code":"423",
"title":"Locked (WebDAV) (RFC 4918)",
"summary":"resource that is being accessed is locked",
"descriptions":{
"wikipedia":{
"body":"The resource that is being accessed is locked.",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#423"
}
},
"references":{
"rails":{
"title":"Rails HTTP Status Symbol",
"value":":locked"
}
}
},
"424":{
"code":"424",
"title":"Failed Dependency (WebDAV) (RFC 4918)",
"summary":"request failed due to failure of a previous request",
"descriptions":{
"wikipedia":{
"body":"The request failed due to failure of a previous request (e.g. a PROPPATCH).",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#424"
}
},
"references":{
"rails":{
"title":"Rails HTTP Status Symbol",
"value":":failed_dependency"
}
}
},
"426":{
"code":"426",
"title":"Upgrade Required (RFC 2817)",
"summary":"client should switch to a different protocol",
"descriptions":{
"wikipedia":{
"body":"The client should switch to a different protocol such as TLS\/1.0.",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#426"
}
},
"references":{
"rails":{
"title":"Rails HTTP Status Symbol",
"value":":upgrade_required"
}
}
},
"428":{
"code":"428",
"title":"Precondition Required",
"summary":"origin server requires the request to be conditional",
"descriptions":{
"wikipedia":{
"body":"The origin server requires the request to be conditional. Intended to prevent \"the 'lost update' problem, where a client GETs a resource's state, modifies it, and PUTs it back to the server, when meanwhile a third party has modified the state on the server, leading to a conflict.\" Proposed in an Internet-Draft.",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#428"
}
}
},
"429":{
"code":"429",
"title":"Too Many Requests",
"summary":"user has sent too many requests in a given amount of time",
"descriptions":{
"wikipedia":{
"body":"The user has sent too many requests in a given amount of time. Intended for use with rate limiting schemes. Proposed in an Internet-Draft.",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#429"
}
}
},
"431":{
"code":"431",
"title":"Request Header Fields Too Large",
"summary":"server is unwilling to process the request",
"descriptions":{
"wikipedia":{
"body":"The server is unwilling to process the request because either an individual header field, or all the header fields collectively, are too large. Proposed in an Internet-Draft.",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#431"
}
}
},
"444":{
"code":"444",
"title":"No Response",
"summary":"server returns no information and closes the connection",
"descriptions":{
"wikipedia":{
"body":"An nginx HTTP server extension. The server returns no information to the client and closes the connection (useful as a deterrent for malware).",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#444"
}
}
},
"449":{
"code":"449",
"title":"Retry With",
"summary":"request should be retried after performing action",
"descriptions":{
"wikipedia":{
"body":"A Microsoft extension. The request should be retried after performing the appropriate action.",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#449"
}
}
},
"450":{
"code":"450",
"title":"Blocked by Windows Parental Controls",
"summary":"Windows Parental Controls blocking access to webpage",
"descriptions":{
"wikipedia":{
"body":"A Microsoft extension. This error is given when Windows Parental Controls are turned on and are blocking access to the given webpage.",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#450"
}
}
},
"499":{
"code":"499",
"title":"Client Closed Request",
"summary":"connection closed by client while HTTP server is processing",
"descriptions":{
"wikipedia":{
"body":"An Nginx HTTP server extension. This code is introduced to log the case when the connection is closed by client while HTTP server is processing its request, making server unable to send the HTTP header back.",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#499"
}
}
}
}
}

View File

@ -34,7 +34,7 @@
<?php if($this->references) { ?>
<div id="code_references">
<div class="header">
<?php echo $this->code; ?> / <span class="status_title">code references</span>
<?php echo $this->code; ?> / <span class="status_title">code reference(s)</span>
</div>
<div class="info_list">
<?php foreach($this->references as $reference) { ?>
@ -43,7 +43,7 @@
<?php echo $reference["title"]; ?>
</div>
<div class="value">
&#8220;<?php echo $reference["value"]; ?>&#8221;
<?php echo $reference["value"]; ?>
</div>
<div class="clear"></div>
</div>