mirror of
https://github.com/zigzap/zap.git
synced 2025-10-20 15:14:08 +00:00
fix #178 status code mismatch
This commit is contained in:
parent
0a582433a5
commit
f4d1ac0a30
1 changed files with 29 additions and 8 deletions
37
src/http.zig
37
src/http.zig
|
@ -47,7 +47,7 @@ pub const StatusCode = enum(u16) {
|
||||||
gone = 410,
|
gone = 410,
|
||||||
length_required = 411,
|
length_required = 411,
|
||||||
precondition_failed = 412,
|
precondition_failed = 412,
|
||||||
payload_too_large = 413,
|
content_too_large = 413,
|
||||||
uri_too_long = 414,
|
uri_too_long = 414,
|
||||||
unsupported_media_type = 415,
|
unsupported_media_type = 415,
|
||||||
range_not_satisfiable = 416,
|
range_not_satisfiable = 416,
|
||||||
|
@ -91,7 +91,7 @@ pub const StatusCode = enum(u16) {
|
||||||
.no_content => "No Content",
|
.no_content => "No Content",
|
||||||
.reset_content => "Reset Content",
|
.reset_content => "Reset Content",
|
||||||
.partial_content => "Partial Content",
|
.partial_content => "Partial Content",
|
||||||
.multiple_choices => "Multiple Choices",
|
.multi_status => "Multi-Status",
|
||||||
.moved_permanently => "Moved Permanently",
|
.moved_permanently => "Moved Permanently",
|
||||||
.found => "Found",
|
.found => "Found",
|
||||||
.see_other => "See Other",
|
.see_other => "See Other",
|
||||||
|
@ -111,11 +111,10 @@ pub const StatusCode = enum(u16) {
|
||||||
.gone => "Gone",
|
.gone => "Gone",
|
||||||
.length_required => "Length Required",
|
.length_required => "Length Required",
|
||||||
.precondition_failed => "Precondition Failed",
|
.precondition_failed => "Precondition Failed",
|
||||||
.request_entity_too_large => "Request Entity Too Large",
|
.content_too_large => "Content Too Large",
|
||||||
.request_uri_too_long => "Request-URI Too Long",
|
.uri_too_long => "URI Too Long",
|
||||||
.unsupported_mediatype => "Unsupported Media Type",
|
.unsupported_media_type => "Unsupported Media Type",
|
||||||
.requested_range_not_satisfiable => "Requested Range Not Satisfiable",
|
.range_not_satisfiable => "Range Not Satisfiable",
|
||||||
.teapot => "I'm a Teapot",
|
|
||||||
.upgrade_required => "Upgrade Required",
|
.upgrade_required => "Upgrade Required",
|
||||||
.request_header_fields_too_large => "Request Header Fields Too Large",
|
.request_header_fields_too_large => "Request Header Fields Too Large",
|
||||||
.expectation_failed => "Expectation Failed",
|
.expectation_failed => "Expectation Failed",
|
||||||
|
@ -125,7 +124,29 @@ pub const StatusCode = enum(u16) {
|
||||||
.service_unavailable => "Service Unavailable",
|
.service_unavailable => "Service Unavailable",
|
||||||
.gateway_timeout => "Gateway Timeout",
|
.gateway_timeout => "Gateway Timeout",
|
||||||
.http_version_not_supported => "HTTP Version Not Supported",
|
.http_version_not_supported => "HTTP Version Not Supported",
|
||||||
_ => "",
|
|
||||||
|
.early_hints => "Early Hints",
|
||||||
|
.already_reported => "Already Reported",
|
||||||
|
.im_used => "IM Used",
|
||||||
|
.unused => "306", // unused
|
||||||
|
.permanent_redirect => "Permanent Redirect",
|
||||||
|
.im_a_teapot => "I'm a teapot",
|
||||||
|
.misdirected_request => "Misdirected Request",
|
||||||
|
.unprocessable_content => "Unprocessable Content", // (WebDAV)
|
||||||
|
.locked => "Locked", // (WebDAV)
|
||||||
|
.failed_dependency => "Failed Dependency", // (WebDAV)
|
||||||
|
.too_early => "Too Early",
|
||||||
|
.precondition_required => "Precondition Required",
|
||||||
|
.too_many_requests => "Too Many Requests",
|
||||||
|
.unavailable_for_legal_reasons => "Unavailable For Legal Reasons", // gotta love those lawyers
|
||||||
|
.variant_also_negotiates => "Variant Also Negotiates",
|
||||||
|
.insufficient_storage => "Insufficient Storage", // (WebDAV)
|
||||||
|
.loop_detected => "Loop Detected", // (WebDAV)
|
||||||
|
.not_extended => "Not Extended",
|
||||||
|
.network_authentication_required => "Network Authentication Required",
|
||||||
|
.processing => "Processing",
|
||||||
|
.multiple_choices => "Multiple Chouces",
|
||||||
|
_ => "(Unknown)",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue