Skip to content

Commit

Permalink
Implement FileServer rewrite API.
Browse files Browse the repository at this point in the history
Implements the FileServer API proposed in
#2716 (comment).

Closes #2716.
  • Loading branch information
the10thWiz authored and SergioBenitez committed Jul 6, 2024
1 parent fb4b630 commit 65e3b87
Show file tree
Hide file tree
Showing 4 changed files with 621 additions and 318 deletions.
2 changes: 2 additions & 0 deletions core/http/src/uri/segments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ impl<'a> Segments<'a, Path> {
for segment in self.clone() {
if segment == ".." {
buf.pop();
} else if segment == "." {
continue;
} else if !allow_dotfiles && segment.starts_with('.') {
return Err(PathError::BadStart('.'))
} else if segment.starts_with('*') {
Expand Down
Loading

0 comments on commit 65e3b87

Please sign in to comment.