본문 바로가기

Programming/Server

[SERVER] 내가 보려고 적는 HTTP 응답 코드

개발하다 보면 안 볼수가 없는 http 응답 코드들 ..

200, 404 등 자주 보는 친구들은 괜찮은데

황당한 숫자가 나오면 바로 구글링..~

이제 검색하기 귀찮아서 정리해버린 오늘의 글입니다 !

 

ctrl + F 해서 해당 코드를 찾아보세요

 

개발 국룰.. 이게 왜 돼 ? 이게 왜 안 돼?

 

(이제 당분간 일주일에 한 번씩 블로깅 예정입니다)

만관부 ~ 😁😋😊😉

 


 

아래와 같은 글은 무시무시한 영어로 적힌 상태코드 정리 파일을 정리하였습니다 !

 

HTTP/1.1: Status Code Definitions

part of Hypertext Transfer Protocol -- HTTP/1.1 RFC 2616 Fielding, et al. 10 Status Code Definitions Each Status-Code is described below, including a description of which method(s) it can follow and any metainformation required in the response. 10.1 Inform

www.w3.org

 

HTTP response status codes - HTTP | MDN

HTTP response status codes indicate whether a specific HTTP request has been successfully completed. Responses are grouped in five classes:

developer.mozilla.org

 

 

HTTP 응답 상태 코드

 

각 번호대로 간단하게 설명하자면 ?

 

  • 1xx (정보): 요청을 받았으며 프로세스를 계속 진행한다.

  • 2xx (성공): 요청을 성공적으로 받았으며 인식했고 수용할 것이다.

  • 3xx (리다이렉션): 요청 완료를 위해 추가 작업 조치가 필요하다.

  • 4xx (클라이언트 오류): 요청의 문법이 잘못되었거나 요청을 처리할 수 없다.

  • 5xx (서버 오류): 서버가 명백히 유효한 요청에 대해 충족을 실패했다.

 


 

1XX: Information responses

 

100 Continue - 클라이언트가 요청을 계속하거나 요청이 이미 완료된 경우

101 Switching Protocol - Websocket 프로토콜 전환시 사용, 클라이언트에 의해 보낸 업그레이드 요청 헤더에 대한 응답으로 보내짐

102 Processing (WebDAV) - 서버가 요청을 수신하여 처리하고 있지만 제대로 된 응답을 알려줄 수 없음을 나타내는 코드

 

2XX: Successful responses

 

200 OK - 요청 성공

201 Created - 요청 성공, 새로운 리소스 생성

202 Accepted - 요청을 수신하였지만 그에 응한 행동을 할 수 없음

203 Non-Authoritative Information - 돌려받은 메타 정보 세트가 origin server의 것과 일치 하지 않으면 local이나 서드 파티 복사본에서 모아졌음을 의미

204 No Content - 요청에 대해 보낼 수 있는 컨텐츠가 없음. 헤더는 있음

205 Reset Content - 요청을 완수한 이후 에이전트에게 요청을 보낸 문서 뷰를 리셋하라고 알려줌

206 Partial Content - 클라이언트에서 복수의 스트림을 분할 다운로드 받고자 할 때 헤더를 전송 시 나타남

207 Multi-Status - 멀티-상태 응답은 여러 리소스가 여러 상태 코드인 상황이 적절한 경우 해당되는 정보 전달

208 ALREADY REPORTED - propstat(property와 status의 합성어) 응답 속성으로 동일 컬렉션으로 바인드된 복수의 내부 멤버를 반복적으로 열거하는 것을 피하기 위해 사용

226 IM Used (HTTP Delta encoding) - server가 GET 요청에 대한 리소스의 의무를 다했을 때

 

3XX: Redirection messages

 

300 Multiple Choice

301 Moved Permanently

302 Found

303 See Other

304 Not Modified

305 Use Proxy

306 unused

307 Temporary Redirect

308 Permanent Redirect

 

4XX: Client error responses

 

400 Bad Request

401 Unauthorized

402 Payment Required

403 Forbidden

404 Not Found

405 Method Not Allowed

406 Not Acceptable

407 Proxy Authentication Required

408 Request Timeout

409 Conflict

410 Gone

411 Length Required

412 Precondition Failed

413 Payload Too Large

414 URI Too Long

415 Unsupported Media Type

416 Requested Range Not Satisfiable

417 Expectation Failed

418 I'm a teapot

421 Misdirected Request

422 Unprocessable Entity (WebDAV)

423 Locked (WebDAV)

424 Failed Dependency (WebDAV)

426 Upgrade Required

428 Precondition Required

429 Too Many Requests

431 Request Header Fields Too Large

451 Unavailable For Legal Reasons

 

5XX: Server error responses

 

500 Internal Server Error

501 Not Implemented

502 Bad Gateway

503 Service Unavailable

504 Gateway Timeout

505 HTTP Version Not Supported

506 Variant Also Negotiates

507 Insufficient Storage

508 Loop Detected (WebDAV)

510 Not Extended

511 Network Authentication Required

 


천천히 .. 정리해 나가도록 하겠습니다..