Http status code

From 탱이의 잡동사니
Jump to navigation Jump to search

Overview

원문은 이곳<ref>http://en.wikipedia.org/wiki/List_of_HTTP_status_codes</ref>에서 확인할 수 있다.

1XX Informational(조건부 응답)

요청을 받았으며, 작업을 계속한다.

이 상태의 상태 코드는 상태-라인과 선택적 헤더(컴퓨터에서 출력될 때 각 페이지 맨 윗부분에 자동으로 붙는 부분)만을 포함하는 임시의 응답을 나타내고 빈 라인에 의해서 종결된다. HTTP/1.0 이래로 어떤 1XX 코드들도 정의되지 않았다. 서버들은 1XX 응답을 실험적인 상태를 제외하고 HTTP/1.0 클라이언트(서버에 연결된 컴퓨터)로 보내면 안된다.

  • 100 Continue(계속)
서버는 Request header 를 수신한 상태이고, Client 는 Request body 를 송신해야 하는 상황이다(Request body 의 전송이 필요한 경우; 예를 들면 POST request 와 같은 경우). 요청자는 요청을 계속해야 한다. 서버는 이 코드를 제공하여 요청의 첫 번째 부분을 받았으며 나머지를 기다리고 있음을 나타낸다.
  • 101 Switching Protocols(프로토콜 전환)
요청자가 서버에 프로토콜 전환을 요청했으며 서버는 이를 승인하는 중이다.
  • 102 processing(WebDAV; RFC 2518)
As a WebDAV request may contain many sub-requests involving file operations, it may take 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 Success(성공)

이 클래스의 상태 코드는 클라이언트가 요청한 동작을 수신하여 이해했고 승낙했으며 성공적으로 처리했음을 가리킨다.

  • 200 OK(성공)
서버가 요청을 제대로 처리했다는 뜻이다.
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 Created(생성됨)
성공적으로 요청되었으며, 서버가 새 리소스를 작성했다.
The request has been fulfilled and resulted in a new resource being created.
  • 202 Accepted(허용됨)
서버가 요청을 접수했지만 아직 처리하지 않았다.
The request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon, as it might be disallowed when processing actually takes place.
  • 203 Non-Authoritative Information(since HTTP/1.1)(신뢰할 수 없는 정보)
서버가 요청을 성공적으로 처리했지만 다른 소스에서 수신된 정보를 제공하고 있다.
The server successfully processed the request, but is returning information that may be from another source.
  • 204 No Content(콘텐츠 없음)
서버가 요청을 성공적으로 처리했지만 콘텐츠를 제공하지 않는다.
The server successfully processed the request, but is not returning any content. Usually used as a response to a successful delete request.
  • 205 Reset Content(콘텐츠 재설정)
서버가 요청을 성공적으로 처리했지만 콘텐츠를 표시하지 않는다. 204 응답과 달리 이 응답은 요청자가 문서 보기를 재설정할 것을 요구한다(예:새 입력을 위한 양식 비우기)
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 Partial Content(RFC 7233)(일부 콘텐츠)
서버가 GET 요청의 일부만 성공적으로 처리했다.
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 tools like wget to enable resuming of interrupted downloads, or split a download into multiple simultaneous streams.
  • 207 Mulit-Status(WebDAV; RFC 4918)(다중 상태)
The message body that follows is an XML message and can contain a number of separate response codes, depending on how many sub-requests were made.
  • 208 Already Reported(WebDAV; RFC 5842)(이미 보고됨)
The members of a DAV binding have already been enumerated in a previous reply to this request, and are not being included again.
  • 226 IM Used(RFC 3229)
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(리다이렉션 완료)

클라이언는 요청을 마치기 위해 추가 동작을 취해야 한다.

This class of status code indicates the client must take additional action to complete the request. Many of these status codes are used in URL redirection.

A user agent may carry out the additional action with no user interaction only if the method used in the second request is GET or HEAD. A user agent should not automatically redirect a request more than five times, since such redirections usually indicate an infinite loop.

  • 300 Multiple Choices(에러 선택항목)
서버가 요청에 따라 여러 조치를 선택할 수 있다. 서버가 사용자 에이전트에 따라 수행할 작업을 선택하거나, 요청자가 선택할 수 있는 작업 목록을 제공한다.
Indicates multiple options for the resource that the client may follow. It, for instance, could be used to present different format options for cideo, list files with different extenstions, or word sense disambiguation.
  • 301 Moved permanently(영구 이동)
요청한 페이지를 새 위치로 영구적으로 이동했다. GET 또는 HEAD 요청에 대한 응답으로 이 응답을 표시하면 요청자가 자동으로 새 위치로 전달된다.
This and all future requests should be directed to the given URL.
  • 302 Found(임시이동)
현재 서버가 다른 위치의 페이지로 요청에 응답하고 있지만 요청자는 향후 요청시 원래 위치를 계속 사용해야 한다.
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 behaviours. However, some Web applications and frameworks use the 302 status code as if it were the 303.
  • 303 See Other(since HTTP/1.1)(기타 위치 보기)
요청자가 다른 위치에 별도의 GET 요청을 하여 응답을 검색할 경우, 서버는 이 코드를 표시한다. HEAD 요청 이외의 모든 요청을 다른 위치로 자동으로 전달한다.
The response to the request can be found under another URI using a GET method. When received in response to a POST (or PUT/DELETE), it should be assumed that the server has received the data and the redirect should be issued with a separate GET message.
  • 304 Not Modified(RFC 7232)(수정되지 않음)
마지막 요청 이후 요청한 페이지는 수정되지 않았다. 서버가 이 응답을 표시하면 페이지의 콘텐츠를 표시하지 않는다. 요청자가 마지막으로 페이지를 요청한 후 페이지가 변경되지 않으면 이 응답(If-Modified-Since HTTP 헤더라고 함)을 표시하도록 서버를 구성해야 한다.
Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match. This means that there is no need to retransmit the resource, since the client still has a previously-downloaded copy.
  • 305 Use Proxy(since HTTP/1.1)(프록시 사용)
요청자는 프록시를 사용하여 요청한 페이지만 액세스할 수 있다. 서버가 이 응답을 표시하면 요청자가 사용할 프록시를 가리키는 것이기도 하다.
The requested resource is only available through a proxy, whose address 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 Switch Proxy
No longer used. Originally meant "Subsequent requests should use the specified proxy."
  • 307 Temporary Redirect(since HTTP/1.1)(임시 리다이렉션)
현재 서버가 다른 위치의 페이지로 요청에 응답하고 있지만 요청자는 향후 요청 시 원래 위치를 계속 사용해야 한다.
In this case, 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 instance, a POST request should be repeated using another request.
  • 308 Resume Incomplete(Google)
This code is used in the Resumable HTTP Requests Proposal to resume aborted PUT or POST requests.

4XX Client error(요청 오류)

4XX 클래스의 상태 코드는 클라이언트에 오류가 있음을 나타낸다.

The 4XX class of status code is intended for cases in which the client seems to have erred. Except when responding to a HEAD request, the server should include an entity containing an explanation of the error situation, and whether it is a temporary or permanent condition. These status codes are applicable to any request method. User agents should display any included entity to the user.

  • 400 Bad Request(잘못된 요청)
서버가 요청의 구문을 인식하지 못했다.
The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
  • 401 Unauthorized(RFC 7235)(권한 없음)
이 요청은 인증이 필요하다. 서버는 로그인이 필요한 페이지에 대해 이 요청을 제공할 수 있다.
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 filed containing a challenge applicable to the requested resource.
  • 402 Payment Required
Reserved for future use. The original intention was the 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. YouTube uses this status if a particular IP address has made excessive requests, and requires the person to enter a CAPCHA.
  • 403 Forbidden(금지됨)
요청 자체는 정상이지만 서버가 응답을 거부한 상태이다. 401 인증 오류와는 달리, 인증을 하더라도 같은 결과가 나올 것이다.
The request was a valid request, but the server is refusing to respond to it. Unlike a 401 Unauthorized response, authenticating will make no difference.
  • 404 Not Found(찾을 수 없음)
서버가 요청한 페이지를 찾을 수 없다. 예를 들어 서버에 존재하지 않는 페이지에 대한 요청이 있을 경우 서버는 이 코드를 제공한다.
The requested resource could not be found but may be available again in the future. Subsequent requests by the client are permissible.
  • 405 Method Not Allowed(허용되지 않는 방법)
요청에 지정된 방법을 사용할 수 없다.
A request was made of 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.
  • 406 Not Acceptable(허용되지 않음)
요청한 페이지가 요청한 콘텐츠 특성으로 응답할 수 없다.
The requsted resource is only capable of generating content not acceptable according to the Accept headers sent in the request.
  • 407 Proxy Authentication Required(RFC 7235)(프록시 인증 필요)
이 상태 코드는 401(권한 없음)과 비슷하지만 요청자가 프록시를 사용하여 인증해야 한다. 서버가 이 응답을 표시하면 요청자가 사용할 프록시를 가리키는 것이기도 하다.
The client must first authenticate itself with the proxy.
  • 408 Request Timeout(요청 시간초과)
서버의 요청 대기가 시간을 초과하였다.
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."

5XX Server error(서버 오류)

  • 500 Internal Server Error(서버 내부 오류)
A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.[76]
  • 501 Not Implemented
The server either does not recognize the request method, or it lacks the ability to fulfill the request. Usually this implies future availability (e.g., a new feature of a web-service API).
  • 502 Bad Gateway
The server was acting as a gateway or proxy and received an invalid response from the upstream server.
  • 503 Service Unavailable
The server is currently unavailable (because it is overloaded or down for maintenance). Generally, this is a temporary state.
  • 504 Gateway Timeout
The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
  • 505 HTTP Version Not Supported
The server does not support the HTTP protocol version used in the request.
  • 506 Variant Also Negotiates (RFC 2295)
Transparent content negotiation for the request results in a circular reference.
  • 507 Insufficient Storage (WebDAV; RFC 4918)
The server is unable to store the representation needed to complete the request.
  • 508 Loop Detected (WebDAV; RFC 5842)
The server detected an infinite loop while processing the request (sent in lieu of 208 Already Reported).
  • 509 Banwidth Limit Exceeded (Apache bw/limited extension)
This status code is not specified in any RFCs. Its use is unknown.
  • 510 Not Extended (RFC 2774)
Further extensions to the request are required for the server to fulfil it.
  • 511 Network Authentication Required (RFC 6585)
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).
  • 520 Unknown Error
This status code is not specified in any RFC and is returned by certain services, for instance Microsoft Azure and CloudFlare servers: "The 520 error is essentially a "catch-all" response for when the origin server returns something unexpected or something that is not tolerated/interpreted(protocol violation or empty response)."
  • 522 Origin Connection Time-out
This status code is not specified in any RFCs, but is used by CloudFlare's reverse proxies to signal that a server connection timed out.
  • 598 Network read timeout error(Unknwon)
This status code is not specified in any RFCs, but is used by Microsoft HTTP proxies to signal a network read timeout behind the proxy to a client in front of the proxy.
  • 599 Network connect timeout error(Unknown)
This status code is not specified in any RFCs, but is used by Microsoft HTTP proxies to signal a network connect timeout behind the proxy to a client in front of the proxy.

References

<references/>