🐪 Коды ответов сервера | LlamasApps

Коды ответов сервера

  • Написано: Ноябрь, 12, 2018
Коды ответов сервера | LlamasApps

1xx Informational responses


100
100 - Continue
This response indicates that everything is OK and the client SHOULD continue with the request or ignore if it is already finished
Wiki: This means that the server has received the request headers and that the client should proceed to send the request body (in the case of a request for which a body needs to be sent; for example, a POST request). If the request body is large, sending it to a server when a request has already been rejected based upon inappropriate headers is inefficient. To have a server check if the request could be accepted based on the request's headers alone, a client must send Expect: 100-continue as a header in its initial request and check if a 100 Continue status code is received in response before continuing (or receive 417 Expectation Failed and not continue).
101
101 - Switching Protocol
The server understands and is willing to comply with the clients request. This code is sent in response to Upgrade request header by the client, and indicates the protocol the server switching to.
Wiki: This means the requester has asked the server to switch protocols and the server is acknowledging that it will do so.
102
102 - Processing
Is an interim response used to inform the client that the server has accepted the complete request, but no response is available yet.
Wiki: A WebDAV request may contain many sub-requests involving file operations, requiring a long time to complete the request. This code indicates that the server has received and is processing the request, but no response is available yet. This prevents the client from timing out and assuming the request was lost.

2xx - Successful responses


200
200 - OK
The request has succeeded. The information returned with response depends on the method of request:
- GET: The resource has been fetched and is transmitted in the message body
- HEAD: The entity headers are in the message body
- PUT: The resource describing the result of the action is transmitted in the message body.
- POST: an entity describing or containing the result of the action
- TRACE: The message body contains the request message as received by the server
Wiki: Standard response for successful HTTP requests. The actual response will depend on the request method used. In a GET request, the response will contain an entity corresponding to the requested resource. In a POST request, the response will contain an entity describing or containing the result of the action.
201
201 - Created
The request has been fulfilled and resulted in a new resource being created. This is typically the response sent after a POST request, or after some PUT requests.
Wiki: The request has been fulfilled, resulting in the creation of a new resource.
202
202 - Accepted
The request has been received but not yet acted upon. The purpose is to allow a server to accept a request from some other process without requiring that the user agent's connection to the server persist until the process is completed.
Wiki: The request has been accepted for processing, but the processing has not been completed. The request might or might not be eventually acted upon, and may be disallowed when processing occurs.
203
203 - Non-Authoritative Information
The returned meta information in the entity-header is not the definitive set as available from the origin server, but is gathered from a local or a third-party copy. Except this condition, 200 OK response should be preferred instead of this message
Wiki: The server is a transforming proxy (e.g. a Web accelerator) that received a 200 OK from its origin, but is returning a modified version of the origin's response.
204
204 - No Content
The server has fulfilled the request but does not need to return an entity-body. The user-agent may update its cached headers for this resource with the new ones.
Wiki: The server successfully processed the request and is not returning any content.
205
205 - Reset Content
205 is sent after accomplishing request to tell user agent to reset document view which sent this request.
Wiki: The server successfully processed the request, but is not returning any content. Unlike a 204 response, this response requires that the requester reset the document view.
206
206 - Partial Content
This is used because of the range headers sent by the client to separate download into multiple streams.
Wiki: The server is delivering only part of the resource (byte serving) due to a range header sent by the client. The range header is used by HTTP clients to enable resuming of interrupted downloads, or split a download into multiple simultaneous streams.
207
207 - Multi - Status (WebDAV)
Provides status for multiple independend operations in situations where multiple status codes might be appropriate
Wiki: The message body that follows is by default an XML message and can contain a number of separate response codes, depending on how many sub-requests were made.
208
208 - Already Reported (WebDAV)
This status code can be used inside a DAV: propstat response element to avoid enumerating the internal members of multiple bindings to the same collection repeatedly.
Wiki: The members of a DAV binding have already been enumerated in a preceding part of the (multistatus) response, and are not being included again.
226
226 - IM Used
The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance.
Wiki: The server has fulfilled a request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance.

3xx - Redirection


300
300 - Multiple Choise
The request has more that one possible reponse. The user agent should choose one of them. However, this specification does not define any standard for such automatic selection
Wiki: Indicates multiple options for the resource from which the client may choose (via agent-driven content negotiation). For example, this code could be used to present multiple video format options, to list files with different filename extensions, or to suggest word-sense disambiguation.
301
301 - Moved Permamently
The requested resource has been assigned a new permanent URI and any future references to this resource should use one of the returned URIs. Probably, the new URI would be given in the response.
Wiki: This and all future requests should be directed to the given URI.
302
302 - Found
302 means that the URI of requested resource has been changed temporarily. New changes in the URI might be made in the future. The client should continue to use the request uri for future requests.
Wiki: Tells the client to look at (browse to) another URL. 302 has been superseded by 303 and 307. This is an example of industry practice contradicting the standard. The HTTP/1.0 specification (RFC 1945) required the client to perform a temporary redirect (the original describing phrase was "Moved Temporarily"), but popular browsers implemented 302 with the functionality of a 303 See Other. Therefore, HTTP/1.1 added status codes 303 and 307 to distinguish between the two behaviors. However, some Web applications and frameworks use the 302 status code as if it were the 303.
303
303 - See Other
The response to the request can be found under a different URI and should be retrieved using a GET method on that resource.
Wiki: The response to the request can be found under another URI using the GET method. When received in response to a POST (or PUT/DELETE), the client should presume that the server has received the data and should issue a new GET request to the given URI.
304
304 - Not Modified
The server should respond with this status code if the client performed a conditional GET request and access is allowed, but the document has not beed modified. This is for caching purposes and tells that client can continue to use same cached version of the response.
Wiki: Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match. In such case, there is no need to retransmit the resource since the client still has a previously-downloaded copy.
305
305 - Use Proxy
The requested resource must be accessed through the proxy given by the Location field. It has been deprecated due to security concerns regarding in-band configuration of a proxy.
Wiki: The requested resource is available only through a proxy, the address for which is provided in the response. Many HTTP clients (such as Mozilla and Internet Explorer) do not correctly handle responses with this status code, primarily for security reasons.
306
306 - Switch Proxy
This reponse code is no longer used and the code is reserved. 306 was used in a previous version of the specification.
Wiki: No longer used. Originally meant "Subsequent requests should use the specified proxy.
307
307 - Temporary Redirect
The requested resource resides temporarily under a different URI. The server sends this response to direct the client to get the requested resource at another URI with the same method that was used in the prior request. The temporary URI should be given by the Location field in the response. This has the same semantics as the 302 Found HTTP response code, with the exception that the user agent must not change the HTTP method used: If a POST was used in the first request, a POST must be used in the second request.
Wiki: In this case, the request should be repeated with another URI; however, future requests should still use the original URI. In contrast to how 302 was historically implemented, the request method is not allowed to be changed when reissuing the original request. For example, a POST request should be repeated using another POST request.
308
308 - Permanent Redirect
The requested resource is now permanently located at another URI, specified by the Location.
Wiki: The request and all future requests should be repeated using another URI. 307 and 308 parallel the behaviors of 302 and 301, but do not allow the HTTP method to change. So, for example, submitting a form to a permanently redirected resource may continue smoothly.

4xx - Client error


400
400 - Bad Request
The request could not be understood by the server due to invalid syntax.
Wiki: The server cannot or will not process the request due to an apparent client error (e.g., malformed request syntax, size too large, invalid request message framing, or deceptive request routing).
401
401 - Unauthorized
This request requires user authentication. That is, the client must authenticate itself to get the requested response.
Wiki: Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has 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. 401 semantically means "unauthenticated", i.e. the user does not have the necessary credentials. Note: Some sites incorrectly issue HTTP 401 when an IP address is banned from the website (usually the website domain) and that specific address is refused permission to access a website.
402
402 - Payment Required
This code is reserved for future use.
Wiki: 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, as proposed for example by GNU Taler, but that has not yet happened, and this code is not usually used. Google Developers API uses this status if a particular developer has exceeded the daily limit on requests. Sipgate uses this code if an account does not have sufficient funds to start a call. Shopify uses this code when the store has not paid their fees and is temporarily disabled.
403
403 - Forbidden
The client does not have access rights to the content. Authorization will not help and the request should not be repeated. Client might be unauthorized, so server is rejecting to give proper response.
Wiki: The request was valid, but the server is refusing action. The user might not have the necessary permissions for a resource, or may need an account of some sort.
404
404 - Not Found
The server has not found anything matching the requested URI. In the browser, the URL is not recognized. 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. Servers may also send this response instead of 403 to hide the existence of a resource from an unauthorized client.
Wiki: The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible.
405
405 - Method Not Allowed
The request method is known by the server but has been disabled and cannot be used. The response must include an allow header containing a list of valid methods for the requested resource.
Wiki: A request method is not supported for the requested resource; for example, a GET request on a form that requires data to be presented via POST, or a PUT request on a read-only resource.
406
406 - Not Acceptable
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.
Wiki: The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.
407
407 - Proxy Authentication Required
This code is similar to 401 (Unauthorized), but authentication is needed to be done by a proxy.
Wiki: The client must first authenticate itself with the proxy.
408
408 - Request Timeout
The client did not produce a request within the time that the server was prepared to wait. It means that the server would like to shut down this unused connection. The client may repeat the request without modifications at any later time.
Wiki: The server timed out waiting for the request. According to 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.
409
409 - Conflict
The request could not be completed due to a conflict with the current state of resource.
Wiki: Indicates that the request could not be processed because of conflict in the current state of the resource, such as an edit conflict between multiple simultaneous updates.
410
410 - Gone
The requested resource is no longer available at the server and no forwarding address is known. Clients are expected to remove their caches and links to the resource. This response is cacheable unless indicated otherwise.
Wiki: 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 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.
411
411 - Length Required
Server rejected the request because the Content-Length header field is not defined and the server requires it.
Wiki: The request did not specify the length of its content, which is required by the requested resource.
412
412 - Precondition Failed
The precondition given in one or more of the request-header fields evaluated to false when it was tested on the server. The client has indicated preconditions in its headers which the server does not meet.
Wiki: The server does not meet one of the preconditions that the requester put on the request.
413
413 - Payload Too Large
The server is refusing to process a request because the request entity is larger than the server is willing or able to process.
Wiki: The request is larger than the server is willing or able to process. Previously called "Request Entity Too Large
414
414 - URI Too Long
The URI requested by the client is longer than the server is willing to interpret.
Wiki: The URI provided was too long for the server to process. Often the result of too much data being encoded as a query-string of a GET request, in which case it should be converted to a POST request. Called "Request-URI Too Long" previously.
415
415 - Unsupported Media Type
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.
Wiki: 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.
416
416 - Range Not Satisfiable
The range specified by the Range header field in the request can not be fulfilled. It is possible that the range is outside the size of the target URIs data.
Wiki: The client has asked for a portion of the file (byte serving), 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. Called "Requested Range Not Satisfiable" previously.
417
417 - Expectation Failed
The expectation given in an Expect request-header field could not be met by this server.
Wiki: The server cannot meet the requirements of the Expect request-header field.
418
418 - I'm a teapot
The server rejected the attempt to brew coffee with a teapot.
Wiki: his 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. The RFC specifies this code should be returned by teapots requested to brew coffee. This HTTP status is used as an Easter egg in some websites, including Google.com.
421
421 - Misdirected Request
The request was directed at a server that is not able to produce a response.
Wiki: The request was directed at a server that is not able to produce a response (for example because of connection reuse).
422
422 - Unprocessable Entity WebDAV
The request was well-formed but was unable to be followed due to semantic errors.
Wiki: The request was well-formed but was unable to be followed due to semantic errors.
423
423 - Locked
Source or destination resource of a method is locked.
Wiki: The resource that is being accessed is locked.
424
424 - Failed Dependency
Method could not be performed on the resource because the requested action depended on another action and that action failed.
Wiki: The request failed because it depended on another request and that request failed (e.g., a PROPPATCH).
426
426 - Upgrade Required
The server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol. The 426 Upgrade Required status code allows a server to definitively state the precise protocol extensions a given resource must be served with.
Wiki: The client should switch to a different protocol such as TLS/1.0, given in the Upgrade header field.
428
428 - Precondition Required
The 428 status code indicates that the origin server requires the request to be conditional. Responses using this status code should explain how to resubmit the request successfully.
Wiki: 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.
429
429 - Too Many Requests
The user has sent too many requests in a given amount of time ("rate limiting"). The response representations should include details explaining the condition, and may include a Retry-After header indicating how long to wait before making a new request.
Wiki: The user has sent too many requests in a given amount of time. Intended for use with rate-limiting schemes.
431
431 - Request Header Fields Too Large
The server is unwilling to process the request because its header fields are too large. It can be used both when the set of request header fields in total are too large, and when a single header field is at fault.
Wiki: The server is unwilling to process the request because either an individual header field, or all the header fields collectively, are too large.
451
451 - Unavailable For Legal Reasons
The user requests an illegal resource, such as a web page censored by a government.
Wiki: A server operator has received a legal demand to deny access to a resource or to a set of resources that includes the requested resource. The code 451 was chosen as a reference to the novel Fahrenheit 451 (see the Acknowledgements in the RFC).

5xx - Server error


The server encountered an unexpected condition it doesn't know how to handle.
500
500 - Internal Server Error
Wiki: A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.
501
501 - Not Implemented
The request method is not supported by the server and cannot be handled. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource.
The server either does not recognize the request method, or it lacks the ability to fulfil the request. Usually this implies future availability (e.g., a new feature of a web-service API).
502
502 - Bad Gateway
This error response means that the server, while working as a gateway to get a response needed to handle the request, got an invalid response.
Wiki: The server was acting as a gateway or proxy and received an invalid response from the upstream server.
503
503 - Service Unavailable
The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. Note that together with this response, a user-friendly page explaining the problem should be sent. The existence of the 503 status code does not imply that a server must use it when becoming overloaded. Some servers may wish to simply refuse the connection.
Wiki: The server is currently unavailable (because it is overloaded or down for maintenance). Generally, this is a temporary state.
504
504 - Gateway Timeout
This error response is given when the server is acting as a gateway and cannot get a response in time.
Wiki: The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
505
505 - HTTP Version Not Supported
The server does not support, or refuses to support, the HTTP protocol version that was used in the request message.
Wiki: The server does not support the HTTP protocol version used in the request.
506
506 - Variant Also Negotiates
The 506 status code indicates that the server has an internal configuration error.
Wiki: Transparent content negotiation for the request results in a circular reference.
507
507 - Insufficient Storage (WebDAV)
The server has an internal configuration error. Method could not be performed on the resource because the server is unable to store the representation needed to successfully complete the request
Wiki: The server is unable to store the representation needed to complete the request.
508
508 - Loop Detected (WebDAV)
The server detected an infinite loop while processing the request. This status indicates that the entire operation failed.
Wiki: The server detected an infinite loop while processing the request (sent in lieu of 208 Already Reported).
510
510 - Not Extended
The server should send back all the information necessary for the client to issue an extended request. It is outside the scope of this specification to specify how the extensions inform the client.
Wiki: Further extensions to the request are required for the server to fulfill it.
511
511 - Network Authentication Required
The 511 status code indicates that the client needs to authenticate to gain network access. The response representation should contain a link to a resource that allows the user to submit credentials (e.g. with a HTML form).
Wiki: The client needs to authenticate to gain network access. Intended for use by intercepting proxies used to control access to the network (e.g., "captive portals" used to require agreement to Terms of Service before granting full Internet access via a Wi-Fi hotspot).