aboutsummaryrefslogtreecommitdiffstats
path: root/src/auth.rs
diff options
context:
space:
mode:
authorSven-Hendrik Haase <svenstaro@gmail.com>2019-03-08 08:07:01 +0000
committerSven-Hendrik Haase <svenstaro@gmail.com>2019-03-08 08:07:24 +0000
commit38d71f05f05aa27167928a548ac8c77d941ebc62 (patch)
treec6221469d043ca0dbd785ee73c02e978b1b92eaa /src/auth.rs
parentRemove note in README about sort order (diff)
downloadminiserve-38d71f05f05aa27167928a548ac8c77d941ebc62.tar.gz
miniserve-38d71f05f05aa27167928a548ac8c77d941ebc62.zip
Send 401 instead of 403 on incorrect password (fixes #47)
Diffstat (limited to '')
-rw-r--r--src/auth.rs2
1 files changed, 1 insertions, 1 deletions
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<crate::MiniserveConfig> 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 {