Skip to content
Merged
Show file tree
Hide file tree
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: 10 additions & 2 deletions include/crow/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ namespace crow
NO_CONTENT = 204,
RESET_CONTENT = 205,
PARTIAL_CONTENT = 206,

WEBDAV_MULTI_STATUS = 207,
MULTIPLE_CHOICES = 300,
MOVED_PERMANENTLY = 301,
FOUND = 302,
Expand All @@ -198,6 +198,13 @@ namespace crow
UNSUPPORTED_MEDIA_TYPE = 415,
RANGE_NOT_SATISFIABLE = 416,
EXPECTATION_FAILED = 417,

WEBDAV_PRECONDITION_FAILED = 412,
WEBDAV_REQUEST_URI_TOO_LONG = 414,
WEBDAV_UNPROCESSABLE_ENTITY = 422,
WEBDAV_LOCKED = 423,
WEBDAV_FAILED_DEPENDENCY = 424,

PRECONDITION_REQUIRED = 428,
TOO_MANY_REQUESTS = 429,
UNAVAILABLE_FOR_LEGAL_REASONS = 451,
Expand All @@ -207,7 +214,8 @@ namespace crow
BAD_GATEWAY = 502,
SERVICE_UNAVAILABLE = 503,
GATEWAY_TIMEOUT = 504,
VARIANT_ALSO_NEGOTIATES = 506
VARIANT_ALSO_NEGOTIATES = 506,
WEBDAV_INSUFFICIENT_STORAGE = 507
};

// clang-format on
Expand Down
10 changes: 8 additions & 2 deletions include/crow/http_response.h
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,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::WEBDAV_MULTI_STATUS, "HTTP/1.1 207 Multi-Status\r\n"},
{status::MULTIPLE_CHOICES, "HTTP/1.1 300 Multiple Choices\r\n"},
{status::MOVED_PERMANENTLY, "HTTP/1.1 301 Moved Permanently\r\n"},
{status::FOUND, "HTTP/1.1 302 Found\r\n"},
Expand All @@ -374,6 +374,11 @@ namespace crow
{status::UNSUPPORTED_MEDIA_TYPE, "HTTP/1.1 415 Unsupported Media Type\r\n"},
{status::RANGE_NOT_SATISFIABLE, "HTTP/1.1 416 Range Not Satisfiable\r\n"},
{status::EXPECTATION_FAILED, "HTTP/1.1 417 Expectation Failed\r\n"},
{status::WEBDAV_PRECONDITION_FAILED, "HTTP/1.1 412 Precondition Failed\r\n"},
{status::WEBDAV_REQUEST_URI_TOO_LONG, "HTTP/1.1 414 Request-URI Too Long\r\n"},
{status::WEBDAV_UNPROCESSABLE_ENTITY, "HTTP/1.1 422 Unprocessable Entity\r\n"},
{status::WEBDAV_LOCKED, "HTTP/1.1 423 Locked\r\n"},
{status::WEBDAV_FAILED_DEPENDENCY, "HTTP/1.1 424 Failed Dependency\r\n"},
{status::PRECONDITION_REQUIRED, "HTTP/1.1 428 Precondition Required\r\n"},
{status::TOO_MANY_REQUESTS, "HTTP/1.1 429 Too Many Requests\r\n"},
{status::UNAVAILABLE_FOR_LEGAL_REASONS, "HTTP/1.1 451 Unavailable For Legal Reasons\r\n"},
Expand All @@ -384,7 +389,8 @@ namespace crow
{status::SERVICE_UNAVAILABLE, "HTTP/1.1 503 Service Unavailable\r\n"},
{status::GATEWAY_TIMEOUT, "HTTP/1.1 504 Gateway Timeout\r\n"},
{status::VARIANT_ALSO_NEGOTIATES, "HTTP/1.1 506 Variant Also Negotiates\r\n"},
};
{status::WEBDAV_INSUFFICIENT_STORAGE, "HTTP/1.1 507 Insufficient Storage\r\n"},
};

static const std::string seperator = ": ";

Expand Down
Loading