Skip to content

Commit 65e3b87

Browse files
the10thWizSergioBenitez
authored andcommitted
Implement FileServer rewrite API.
Implements the FileServer API proposed in rwf2#2716 (comment). Closes rwf2#2716.
1 parent fb4b630 commit 65e3b87

File tree

4 files changed

+621
-318
lines changed

4 files changed

+621
-318
lines changed

core/http/src/uri/segments.rs

+2
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ impl<'a> Segments<'a, Path> {
218218
for segment in self.clone() {
219219
if segment == ".." {
220220
buf.pop();
221+
} else if segment == "." {
222+
continue;
221223
} else if !allow_dotfiles && segment.starts_with('.') {
222224
return Err(PathError::BadStart('.'))
223225
} else if segment.starts_with('*') {

0 commit comments

Comments
 (0)