mirror of https://github.com/fafhrd91/actix-web
Update encoding.rs
This commit is contained in:
parent
497bcbaf8b
commit
4e7d96c8b9
|
@ -35,7 +35,10 @@ async fn test_utf8_file_contents() {
|
||||||
res.headers().get(header::CONTENT_TYPE),
|
res.headers().get(header::CONTENT_TYPE),
|
||||||
Some(&HeaderValue::from_static("text/plain; charset=utf-8")),
|
Some(&HeaderValue::from_static("text/plain; charset=utf-8")),
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[actix_rt::test]
|
||||||
|
async fn test_directory_traversal_prevention() {
|
||||||
// prevent directory traversal attack
|
// prevent directory traversal attack
|
||||||
let srv = test::init_service(App::new().service(Files::new("/", "./tests"))).await;
|
let srv = test::init_service(App::new().service(Files::new("/", "./tests"))).await;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue