summaryrefslogtreecommitdiff
path: root/spider/src/http_status.rs
diff options
context:
space:
mode:
authorAndrew <saintruler@gmail.com>2021-02-18 19:48:06 +0400
committerAndrew <saintruler@gmail.com>2021-02-18 19:48:06 +0400
commit0a1d8409e49343427d26c4ddf0bf56d5b3e7b7d5 (patch)
tree9654645e0c74af2cf834ac4f1d7d68ca219a57e6 /spider/src/http_status.rs
parent9b69d6460e91244bfd77d8ea77c13d21d9050e4c (diff)
Renamed spider package to spider_server
Diffstat (limited to 'spider/src/http_status.rs')
-rw-r--r--spider/src/http_status.rs60
1 files changed, 0 insertions, 60 deletions
diff --git a/spider/src/http_status.rs b/spider/src/http_status.rs
deleted file mode 100644
index 0ea889e..0000000
--- a/spider/src/http_status.rs
+++ /dev/null
@@ -1,60 +0,0 @@
-pub fn get_status_text(code: u16) -> Option<String> {
- match code {
- 100 => Some(String::from("Continue")),
- 101 => Some(String::from("Switching Protocols")),
- 102 => Some(String::from("Processing")),
- 200 => Some(String::from("OK")),
- 201 => Some(String::from("Created")),
- 202 => Some(String::from("Accepted")),
- 203 => Some(String::from("Non Authoritative Information")),
- 204 => Some(String::from("No Content")),
- 205 => Some(String::from("Reset Content")),
- 206 => Some(String::from("Partial Content")),
- 207 => Some(String::from("Multi Status")),
- 226 => Some(String::from("IM Used")),
- 300 => Some(String::from("Multiple Choices")),
- 301 => Some(String::from("Moved Permanently")),
- 302 => Some(String::from("Found")),
- 303 => Some(String::from("See Other")),
- 304 => Some(String::from("Not Modified")),
- 305 => Some(String::from("Use Proxy")),
- 307 => Some(String::from("Temporary Redirect")),
- 308 => Some(String::from("Permanent Redirect")),
- 400 => Some(String::from("Bad Request")),
- 401 => Some(String::from("Unauthorized")),
- 402 => Some(String::from("Payment Required")),
- 403 => Some(String::from("Forbidden")),
- 404 => Some(String::from("Not Found")),
- 405 => Some(String::from("Method Not Allowed")),
- 406 => Some(String::from("Not Acceptable")),
- 407 => Some(String::from("Proxy Authentication Required")),
- 408 => Some(String::from("Request Timeout")),
- 409 => Some(String::from("Conflict")),
- 410 => Some(String::from("Gone")),
- 411 => Some(String::from("Length Required")),
- 412 => Some(String::from("Precondition Failed")),
- 413 => Some(String::from("Request Entity Too Large")),
- 414 => Some(String::from("Request URI Too Long")),
- 415 => Some(String::from("Unsupported Media Type")),
- 416 => Some(String::from("Requested Range Not Satisfiable")),
- 417 => Some(String::from("Expectation Failed")),
- 418 => Some(String::from("I'm a teapot")),
- 421 => Some(String::from("Misdirected Request")),
- 422 => Some(String::from("Unprocessable Entity")),
- 423 => Some(String::from("Locked")),
- 424 => Some(String::from("Failed Dependency")),
- 426 => Some(String::from("Upgrade Required")),
- 428 => Some(String::from("Precondition Required")),
- 429 => Some(String::from("Too Many Requests")),
- 431 => Some(String::from("Request Header Fields Too Large")),
- 449 => Some(String::from("Retry With")),
- 451 => Some(String::from("Unavailable For Legal Reasons")),
- 500 => Some(String::from("Internal Server Error")),
- 501 => Some(String::from("Not Implemented")),
- 502 => Some(String::from("Bad Gateway")),
- 503 => Some(String::from("Service Unavailable")),
- 504 => Some(String::from("Gateway Timeout")),
- 505 => Some(String::from("HTTP Version Not Supported")),
- _ => None
- }
-}