1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-09-01 01:16:59 +02:00

Rename HttpRequest::without_state into drop_state and make it public

This commit is contained in:
Douman
2018-04-11 22:27:17 +03:00
parent c570229351
commit 62a9b4c53c
5 changed files with 15 additions and 15 deletions

View File

@@ -498,18 +498,18 @@ impl<S: 'static> Handler<S> for StaticFiles<S> {
HttpResponse::Found()
.header(header::LOCATION, new_path.as_str())
.finish()
.respond_to(req.without_state())
.respond_to(req.drop_state())
} else if self.show_index {
Directory::new(self.directory.clone(), path)
.respond_to(req.without_state())?
.respond_to(req.without_state())
.respond_to(req.drop_state())?
.respond_to(req.drop_state())
} else {
Ok(self.default.handle(req))
}
} else {
NamedFile::open(path)?.set_cpu_pool(self.cpu_pool.clone())
.respond_to(req.without_state())?
.respond_to(req.without_state())
.respond_to(req.drop_state())?
.respond_to(req.drop_state())
}
}
}