From f1c118535292fd7aba240713a4b869e00eaccc27 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 11 Nov 2018 00:43:32 +0100 Subject: main(): Log error if stdin fails to read to string --- license-generator/src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/license-generator/src/main.rs b/license-generator/src/main.rs index 8636055..4e47c33 100644 --- a/license-generator/src/main.rs +++ b/license-generator/src/main.rs @@ -71,7 +71,10 @@ fn main() -> Result<()> { fastcgi::run(|mut req| { let mut params = String::new(); - req.stdin().read_to_string(&mut params).unwrap_or(0); + match req.stdin().read_to_string(&mut params) { + Ok(_) => (), + Err(e) => error!("{}", e), + } log_request(&req, ¶ms); -- cgit v1.2.3