Skip to content

Commit 7eb89bc

Browse files
Nemo157Joshua Nelson
authored andcommitted
Revert "Don't serve non-rustdoc resources from the shared resource handler"
This reverts commit d8caa1c.
1 parent 6a81b64 commit 7eb89bc

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/web/rustdoc.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -635,10 +635,6 @@ pub struct SharedResourceHandler;
635635
impl Handler for SharedResourceHandler {
636636
fn handle(&self, req: &mut Request) -> IronResult<Response> {
637637
let path = req.url.path();
638-
if path.len() > 1 {
639-
// All rustdoc shared resources are hosted at the root
640-
return Err(Nope::ResourceNotFound.into());
641-
}
642638
let filename = path.last().unwrap(); // unwrap is fine: vector is non-empty
643639
let suffix = filename.split('.').last().unwrap(); // unwrap is fine: split always works
644640
if ["js", "css", "woff", "svg"].contains(&suffix) {

0 commit comments

Comments
 (0)