| author | |
| committer | |
| log | 450f3bc9250eca86b470ec29c228165054016c76 |
| tree | af00566cf5a7044a760147f01b2f5ed7f4ce3e85 |
| parent | ba1e53f116b27f97828d495af2ea5b87fd9632cb |
RFC 9110 section 15:
Values outside the range 100..599 are invalid. Implementations often use
three-digit integer values outside of that range (i.e., 600..999) for
internal communication of non-HTTP status (e.g., library errors). A
client that receives a response with an invalid status code SHOULD
process the response as if it had a 5xx (Server Error) status code.1 files changed, 1 insertions(+), 3 deletions(-)
lib/std/http.zig+1-3| ... | ... | @@ -218,7 +218,6 @@ pub const Status = enum(u10) { |
| 218 | 218 | } |
| 219 | 219 | |
| 220 | 220 | pub const Class = enum { |
| 221 | nonstandard, | |
| 222 | 221 | informational, |
| 223 | 222 | success, |
| 224 | 223 | redirect, |
| ... | ... | @@ -232,8 +231,7 @@ pub const Status = enum(u10) { |
| 232 | 231 | 200...299 => .success, |
| 233 | 232 | 300...399 => .redirect, |
| 234 | 233 | 400...499 => .client_error, |
| 235 | 500...599 => .server_error, | |
| 236 | else => .nonstandard, | |
| 234 | else => .server_error, | |
| 237 | 235 | }; |
| 238 | 236 | } |
| 239 | 237 |