aboutsummaryrefslogtreecommitdiffstats
path: root/src/auth.rs
diff options
context:
space:
mode:
authorkhai96_ <hvksmr1996@gmail.com>2019-05-30 10:34:09 +0000
committerkhai96_ <hvksmr1996@gmail.com>2019-05-30 10:34:09 +0000
commite92efb863f10e36522ac1241b16276cd55686e1f (patch)
treeffa2ffa37de9b2267be429e9d531df0d064af44f /src/auth.rs
parentFix regression where path cannot be placed after '--auth <auth>' (diff)
downloadminiserve-e92efb863f10e36522ac1241b16276cd55686e1f.tar.gz
miniserve-e92efb863f10e36522ac1241b16276cd55686e1f.zip
Apply WWW_AUTHENTICATE to all Unauthorized branches
Diffstat (limited to 'src/auth.rs')
-rw-r--r--src/auth.rs11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/auth.rs b/src/auth.rs
index 762746b..2c98622 100644
--- a/src/auth.rs
+++ b/src/auth.rs
@@ -122,17 +122,6 @@ impl Middleware<crate::MiniserveConfig> for Auth {
if match_auth(auth_req, required_auth) {
return Ok(Response::Done(resp));
}
-
- return Ok(Response::Done(
- HttpResponse::Unauthorized().body(
- build_unauthorized_response(
- &req,
- ContextualError::InvalidHTTPCredentials,
- true,
- StatusCode::UNAUTHORIZED,
- )
- )
- ));
}
Ok(Response::Done(