Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class Response extends AbstractMessage implements ResponseInterface
const STATUS_CODE_206 = 206;
const STATUS_CODE_207 = 207;
const STATUS_CODE_208 = 208;
const STATUS_CODE_226 = 226;
const STATUS_CODE_300 = 300;
const STATUS_CODE_301 = 301;
const STATUS_CODE_302 = 302;
Expand All @@ -43,6 +44,7 @@ class Response extends AbstractMessage implements ResponseInterface
const STATUS_CODE_305 = 305;
const STATUS_CODE_306 = 306;
const STATUS_CODE_307 = 307;
const STATUS_CODE_308 = 308;
const STATUS_CODE_400 = 400;
const STATUS_CODE_401 = 401;
const STATUS_CODE_402 = 402;
Expand Down Expand Up @@ -71,6 +73,8 @@ class Response extends AbstractMessage implements ResponseInterface
const STATUS_CODE_429 = 429;
const STATUS_CODE_431 = 431;
const STATUS_CODE_451 = 451;
const STATUS_CODE_444 = 444;
const STATUS_CODE_499 = 499;
const STATUS_CODE_500 = 500;
const STATUS_CODE_501 = 501;
const STATUS_CODE_502 = 502;
Expand All @@ -80,7 +84,9 @@ class Response extends AbstractMessage implements ResponseInterface
const STATUS_CODE_506 = 506;
const STATUS_CODE_507 = 507;
const STATUS_CODE_508 = 508;
const STATUS_CODE_510 = 510;
const STATUS_CODE_511 = 511;
const STATUS_CODE_599 = 599;
/**#@-*/

/**
Expand All @@ -101,6 +107,7 @@ class Response extends AbstractMessage implements ResponseInterface
206 => 'Partial Content',
207 => 'Multi-status',
208 => 'Already Reported',
226 => 'IM Used',
// REDIRECTION CODES
300 => 'Multiple Choices',
301 => 'Moved Permanently',
Expand All @@ -110,6 +117,7 @@ class Response extends AbstractMessage implements ResponseInterface
305 => 'Use Proxy',
306 => 'Switch Proxy', // Deprecated
307 => 'Temporary Redirect',
308 => 'Permanent Redirect',
// CLIENT ERROR
400 => 'Bad Request',
401 => 'Unauthorized',
Expand Down Expand Up @@ -138,7 +146,9 @@ class Response extends AbstractMessage implements ResponseInterface
428 => 'Precondition Required',
429 => 'Too Many Requests',
431 => 'Request Header Fields Too Large',
444 => 'Connection Closed Without Response',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't appear to be "official"? Not sure what the stance is on this.
https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#nginx

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exists in diactoros/response

451 => 'Unavailable For Legal Reasons',
499 => 'Client Closed Request',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't appear to be "official"? Not sure what the stance is on this.
https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#nginx

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exists in diactoros/response

// SERVER ERROR
500 => 'Internal Server Error',
501 => 'Not Implemented',
Expand All @@ -149,7 +159,9 @@ class Response extends AbstractMessage implements ResponseInterface
506 => 'Variant Also Negotiates',
507 => 'Insufficient Storage',
508 => 'Loop Detected',
510 => 'Not Extended',
511 => 'Network Authentication Required',
599 => 'Network Connect Timeout Error',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't appear to be "official"? Not sure what the stance is on this.
https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#Unofficial_codes

];

/**
Expand Down