1
0
mirror of https://github.com/actix/actix-website synced 2025-06-27 07:29:02 +02:00

Remove invalid docs regarding parsing PathBuf (#230)

This paragraph is no longer valid since v1.0!

Also, the example code still compiles fine and this may easily introduce
a security vulnerability for the user.
This commit is contained in:
Ali MJ Al-Nasrawy
2021-06-01 15:04:35 +03:00
committed by GitHub
parent 63d70701e0
commit 09ad5775ac
3 changed files with 0 additions and 37 deletions

View File

@ -7,7 +7,6 @@ pub mod norm;
pub mod norm2;
pub mod path;
pub mod path2;
pub mod pbuf;
pub mod resource;
pub mod scope;
pub mod url_ext;

View File

@ -1,18 +0,0 @@
// <pbuf>
use actix_web::{get, App, HttpRequest, HttpServer, Result};
use std::path::PathBuf;
#[get("/a/{tail:.*}")]
async fn index(req: HttpRequest) -> Result<String> {
let path: PathBuf = req.match_info().query("tail").parse().unwrap();
Ok(format!("Path {:?}", path))
}
#[actix_web::main]
async fn main() -> std::io::Result<()> {
HttpServer::new(|| App::new().service(index))
.bind("127.0.0.1:8080")?
.run()
.await
}
// </pbuf>