From 38d71f05f05aa27167928a548ac8c77d941ebc62 Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Fri, 8 Mar 2019 09:07:01 +0100 Subject: Send 401 instead of 403 on incorrect password (fixes #47) --- src/auth.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/auth.rs') diff --git a/src/auth.rs b/src/auth.rs index 7b72b21..e8600fb 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -59,7 +59,7 @@ impl Middleware for Auth { if auth_req.username != required_auth.username || auth_req.password != required_auth.password { - let new_resp = HttpResponse::Forbidden().finish(); + let new_resp = HttpResponse::Unauthorized().finish(); return Ok(Response::Done(new_resp)); } } else { -- cgit v1.2.3