Make asynchronous via tokio
Change-Id: I6bfc92512e112b794e3562bb98f54fbc52128d56
Reviewed-on: https://git.clicks.codes/c/Clicks/BYO/HttpServer/rust/+/257
Tested-by: Skyler Grey <minion@clicks.codes>
Reviewed-by: Samuel Shuert <coded@clicks.codes>
diff --git a/src/main.rs b/src/main.rs
index bdd2cf6..6395f20 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -30,9 +30,9 @@
request.insert("method".to_owned(), splits.next().unwrap().to_owned());
request.insert("path".to_owned(), splits.next().unwrap().to_owned());
} else {
- let mut splits = line.split(": ");
+ let mut splits = line.split(":");
let key = splits.next().unwrap();
- let value = splits.next().unwrap();
+ let value = splits.next().unwrap().trim();
request.insert(key.to_owned(), value.to_owned());
}