Skip to content

Commit

Permalink
Add support for status code 418 (drogonframework#557)
Browse files Browse the repository at this point in the history
  • Loading branch information
marty1885 authored Sep 3, 2020
1 parent 19df3af commit 3a00ffd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/inc/drogon/HttpTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ enum HttpStatusCode
k415UnsupportedMediaType = 415,
k416RequestedRangeNotSatisfiable = 416,
k417ExpectationFailed = 417,
k418ImATeapot = 418,
k421MisdirectedRequest = 421,
k425TooEarly = 425,
k426UpgradeRequired = 426,
Expand Down
5 changes: 5 additions & 0 deletions lib/src/HttpUtils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,11 @@ const string_view &statusCodeToString(int code)
static string_view sv = "Expectation Failed";
return sv;
}
case 418:
{
static string_view sv = "I'm a Teapot";
return sv;
}
case 421:
{
static string_view sv = "Misdirected Request";
Expand Down

0 comments on commit 3a00ffd

Please sign in to comment.