Browse Source

Respond to any path with index.html

This is for the html5 location API to work correctly
Thomas Dy 8 years ago
parent
commit
8a87ccfdce
1 changed files with 3 additions and 0 deletions
  1. 3 0
      rust-server/src/handler.rs

+ 3 - 0
rust-server/src/handler.rs

@@ -111,6 +111,9 @@ impl Handler for SiteHandler {
                         res.send(b"Unauthorized").unwrap();
                     }
                 },
+                (&Get, _) => {
+                    res.send(INDEX_HTML.as_bytes()).unwrap();
+                },
                 _ => {
                     *res.status_mut() = NotFound;
                     res.send(b"Not Found").unwrap();