Skip to content

Commit

Permalink
Merge pull request #8 from dimitriscruz/conflict-code
Browse files Browse the repository at this point in the history
httpd: add status_type 409
  • Loading branch information
Alexander Gallego committed May 8, 2021
2 parents d7fa70d + 4c8a7ee commit 8cdc3c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/seastar/http/reply.hh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ struct reply {
forbidden = 403, //!< forbidden
not_found = 404, //!< not_found
not_acceptable = 406, //!< not_acceptable
conflict = 409, //!< conflict
length_required = 411, //!< length_required
payload_too_large = 413, //!< payload_too_large
unsupported_media_type = 415, //!< unsupported_media_type
Expand Down
3 changes: 3 additions & 0 deletions src/http/reply.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const sstring unauthorized = " 401 Unauthorized\r\n";
const sstring forbidden = " 403 Forbidden\r\n";
const sstring not_found = " 404 Not Found\r\n";
const sstring not_acceptable = " 406 Not Acceptable\r\n";
const sstring conflict = " 409 Conflict\r\n";
const sstring length_required = " 411 Length Required\r\n";
const sstring payload_too_large = " 413 Payload Too Large\r\n";
const sstring unsupported_media_type = " 415 Unsupported Media Type\r\n";
Expand Down Expand Up @@ -92,6 +93,8 @@ static const sstring& to_string(reply::status_type status) {
return not_found;
case reply::status_type::not_acceptable:
return not_acceptable;
case reply::status_type::conflict:
return conflict;
case reply::status_type::length_required:
return length_required;
case reply::status_type::payload_too_large:
Expand Down

0 comments on commit 8cdc3c1

Please sign in to comment.