forgot to delete slashes

This commit is contained in:
TriMill 2022-07-03 17:27:38 -04:00
parent 079fe1502d
commit 1f16b4d5ef
1 changed files with 2 additions and 2 deletions

View File

@ -34,12 +34,12 @@ pub fn start(address: &str, thread_count: usize, state: Arc<Mutex<State>>) -> Ve
};
let page = url.path().split("/").last().unwrap_or("");
let res = match page {
"/rss.xml" => {
"rss.xml" => {
let guard = state.lock().unwrap();
let header = tiny_http::Header::from_bytes(&b"Content-Type"[..], &b"text/xml"[..]).unwrap();
Response::from_string(&guard.rss).with_header(header)
},
"/status" => {
"status" => {
let guard = state.lock().unwrap();
Response::from_string(guard.status.as_ref().unwrap_or(&"Status page disabled".into()))
},