()
| 63 | } |
| 64 | |
| 65 | pub fn not_found() -> HttpResponse { |
| 66 | HttpResponse { |
| 67 | status_code: 404, |
| 68 | headers: vec![HeaderField("Content-Type".into(), "text/plain".into())], |
| 69 | body: "404 Not Found".as_bytes().to_owned(), |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | pub fn parse_path(url: &str) -> Option<&str> { |
| 74 | url.split('?').next() |