Fix rewrite_path
This commit is contained in:
parent
aa6c8d8a57
commit
64f54e8e58
|
@ -227,7 +227,14 @@ impl Request {
|
|||
#[cfg(feature = "scgi_srv")] {
|
||||
self.script_path.as_ref().map(|base| {
|
||||
let base: &Path = base.as_ref();
|
||||
base.join(path.as_ref()).display().to_string()
|
||||
|
||||
// Make path relative
|
||||
let mut path_as_path: &Path = path.as_ref().as_ref();
|
||||
if path_as_path.is_absolute() {
|
||||
path_as_path = (&path.as_ref()[1..]).as_ref();
|
||||
}
|
||||
|
||||
base.join(path_as_path).display().to_string()
|
||||
})
|
||||
}
|
||||
#[cfg(feature = "gemini_srv")] {
|
||||
|
|
Loading…
Reference in a new issue