Skip to content

Commit

Permalink
Add http 208 & 408 codes
Browse files Browse the repository at this point in the history
  • Loading branch information
kingster committed Mar 20, 2022
1 parent bdbed55 commit 0e0b214
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/crow/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ namespace crow
NO_CONTENT = 204,
RESET_CONTENT = 205,
PARTIAL_CONTENT = 206,
ALREADY_REPORTED = 208,

MULTIPLE_CHOICES = 300,
MOVED_PERMANENTLY = 301,
Expand All @@ -191,6 +192,7 @@ namespace crow
NOT_FOUND = 404,
METHOD_NOT_ALLOWED = 405,
PROXY_AUTHENTICATION_REQUIRED = 407,
REQUEST_TIMEOUT = 408,
CONFLICT = 409,
GONE = 410,
PAYLOAD_TOO_LARGE = 413,
Expand Down
2 changes: 2 additions & 0 deletions include/crow/http_connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ namespace crow
{status::NO_CONTENT, "HTTP/1.1 204 No Content\r\n"},
{status::RESET_CONTENT, "HTTP/1.1 205 Reset Content\r\n"},
{status::PARTIAL_CONTENT, "HTTP/1.1 206 Partial Content\r\n"},
{status::ALREADY_REPORTED, "HTTP/1.1 208 Already Reported\r\n"},

{status::MULTIPLE_CHOICES, "HTTP/1.1 300 Multiple Choices\r\n"},
{status::MOVED_PERMANENTLY, "HTTP/1.1 301 Moved Permanently\r\n"},
Expand All @@ -308,6 +309,7 @@ namespace crow
{status::NOT_FOUND, "HTTP/1.1 404 Not Found\r\n"},
{status::METHOD_NOT_ALLOWED, "HTTP/1.1 405 Method Not Allowed\r\n"},
{status::PROXY_AUTHENTICATION_REQUIRED, "HTTP/1.1 407 Proxy Authentication Required\r\n"},
{status::REQUEST_TIMEOUT, "HTTP/1.1 408 Request Timeout\r\n"},
{status::CONFLICT, "HTTP/1.1 409 Conflict\r\n"},
{status::GONE, "HTTP/1.1 410 Gone\r\n"},
{status::PAYLOAD_TOO_LARGE, "HTTP/1.1 413 Payload Too Large\r\n"},
Expand Down

0 comments on commit 0e0b214

Please sign in to comment.