aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorHimbeerserverDE <himbeerserverde@gmail.com>2023-11-25 11:58:08 +0100
committerHimbeerserverDE <himbeerserverde@gmail.com>2023-11-25 11:58:08 +0100
commit9805823fdd99fa32d5eda2b78c2d403ce22af33d (patch)
tree5e603e261d9f6487f2877e126a8620abbd88aec6 /src/main.rs
parent5cf892c6b74b1dbbac9fb64c43b42bdcba0f43d0 (diff)
use text/plain for /proc/top
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 4bfe098..84e545e 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -288,11 +288,11 @@ async fn handle_proc_top() -> HttpResponse {
.processes()
.values()
.map(|process| format!("{} {}%", process.name(), process.cpu_usage()))
- .reduce(|acc, line| acc + "<br>" + &line)
+ .reduce(|acc, line| acc + "\n" + &line)
.unwrap_or(String::new());
HttpResponse::Ok()
- .content_type(ContentType::html())
+ .content_type(ContentType::plaintext())
.body(out)
}