src/server/rest.rs: correctly insert NoLogExtension()

This commit is contained in:
Dietmar Maurer 2019-02-18 06:54:12 +01:00
parent bc6fa1684e
commit 435615a34a

View File

@ -181,16 +181,17 @@ fn proxy_protected_request(
.request(request)
.map_err(|e| Error::from(e))
.map(|mut resp| {
resp.extensions_mut().insert(NoLogExtension);
resp.extensions_mut().insert(NoLogExtension());
resp
});
let resp = if info.reload_timezone {
Either::A(resp.then(|resp| {unsafe { tzset() }; resp }))
} else {
Either::B(resp)
};
return Box::new(resp);
}