Skip to content

The most comprehensive list of reference of "HTTP Status Codes" to date, in Array format, ready to be used by any PHP application.

License

Notifications You must be signed in to change notification settings

jcmarchi/HTTP-Status-Codes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

HTTP Status Codes List

Based on IETF Review Reference [RFC 7231] and (lots of) private research.

A single PHP page with the most comprehensive list of HTTP Status Codes, organized in an Array format, ready to be added to any PHP application.

The $HTTP_Status_Code Array comprises all the HTTP Status Codes known to date, official and unofficial ones.

The official codes are referenced to their RFC document, while the unofficial ones are disclosed using the most accurate information found, preceded by the "UNOFFICIAL" keyword.

The reason why I put together this Array was because, more than once, I found myself needing to review HTTP responses in my programs, thus this file was created.

During the process of collecting information to compose this file I realized that most of the lists I was checking didn't exactly match. Some had more or less codes, while others differ in the labels and definitions presented. However, what I found specially peculiar was the fact that unnoficial codes were commonly present in official reference lists, while in many cases a handfull of official codes were simply ignored. Because of that, and because my research also showed me that some unnoficial codes were still present in current products, I decided to include all of them in my final Array. Afterall, official or not, it is always good to have the most accurate and complete data to fall back to.

The HTTP Status Codes (also commonly referenced as "Response Codes") are divided in:

  • 1xx: Informational: Request received, continuing process.
  • 2xx: Success: The action was successfully received, understood, and accepted.
  • 3xx: Redirection: Further action must be taken in order to complete the request.
  • 4xx: Client Error: The request contains bad syntax or cannot be fulfilled.
  • 5xx: Server Error: The server failed to fulfill an apparently valid request.

Important Remarks:

  1. If a Status Code is not listed in the Array, then it can be understood as "Unassigned".
  2. In the commented lines, where it reads "UNOFFICIAL" it means the code is not specified by any RFC document, but may be used (or is available to be used) by third-party services to provide semantic or RESTful error responses. More at: Wikipedia.

References:

About

The most comprehensive list of reference of "HTTP Status Codes" to date, in Array format, ready to be used by any PHP application.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages