Skip to content

Commit

Permalink
Merge pull request #307 from kulkom/master
Browse files Browse the repository at this point in the history
Implement the BEST http status code in the universe, 418 I'm a teapot.
  • Loading branch information
davidmoreno authored Jul 28, 2022
2 parents c6418b6 + 6d4da36 commit 98e5a9a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/onion/response.c
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,8 @@ const char *onion_response_code_description(int code) {
return "Method Not Allowed";
case HTTP_RANGE_NOT_SATISFIABLE:
return "Range Not Satisfiable";
case HTTP_IM_A_TEAPOT:
return "I'm a teapot";

case HTTP_INTERNAL_ERROR:
return "Internal Server Error";
Expand Down
1 change: 1 addition & 0 deletions src/onion/response.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ extern "C" {
HTTP_NOT_FOUND = 404,
HTTP_METHOD_NOT_ALLOWED = 405,
HTTP_RANGE_NOT_SATISFIABLE = 416,
HTTP_IM_A_TEAPOT = 418,

// Error codes
HTTP_INTERNAL_ERROR = 500,
Expand Down

0 comments on commit 98e5a9a

Please sign in to comment.