mirror of
https://github.com/fafhrd91/actix-web
synced 2025-08-31 17:07:01 +02:00
propogate app config with http request; add tests for url_for
This commit is contained in:
15
src/rmap.rs
15
src/rmap.rs
@@ -64,14 +64,13 @@ impl ResourceMap {
|
||||
|
||||
if self.patterns_for(name, &mut path, &mut elements)?.is_some() {
|
||||
if path.starts_with('/') {
|
||||
// let conn = req.connection_info();
|
||||
// Ok(Url::parse(&format!(
|
||||
// "{}://{}{}",
|
||||
// conn.scheme(),
|
||||
// conn.host(),
|
||||
// path
|
||||
// ))?)
|
||||
unimplemented!()
|
||||
let conn = req.connection_info();
|
||||
Ok(Url::parse(&format!(
|
||||
"{}://{}{}",
|
||||
conn.scheme(),
|
||||
conn.host(),
|
||||
path
|
||||
))?)
|
||||
} else {
|
||||
Ok(Url::parse(&path)?)
|
||||
}
|
||||
|
Reference in New Issue
Block a user